Skip to content

Commit

Permalink
fix(vscode): reload pdv by navigating with the router (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Feb 2, 2024
1 parent 9ca2fb4 commit 5f43593
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions libs/vscode/project-details/src/lib/project-details-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ export class ProjectDetailsPreview {
window.addEventListener('message', ({ data }) => {
const { type, payload } = data;
if(type === 'reload') {
console.log('reloading')
const currentLocation = window.externalApi.router.state.location;
const newUrl = currentLocation.pathname + currentLocation.search
window.externalApi.router.navigate(newUrl, {
preventScrollReset: true,
});
window.waitForRouter().then(() => {
window.externalApi.openProjectDetails('${project?.name}')
})
}
});
</script>
Expand Down

0 comments on commit 5f43593

Please sign in to comment.