Skip to content

Commit

Permalink
Issue: Open Preview button stops working #738
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jan 23, 2024
1 parent 3eb23d7 commit b981ed6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [#721](https://github.com/estruyf/vscode-front-matter/issues/721): Fix keywords regex to support unicode characters
- [#725](https://github.com/estruyf/vscode-front-matter/issues/725): Fix for opening menu of pinned items
- [#730](https://github.com/estruyf/vscode-front-matter/issues/730): Add debounce to the input fields
- [#738](https://github.com/estruyf/vscode-front-matter/issues/738): Fix when re-opening the preview after closing it

## [9.4.0] - 2023-12-12 - [Release notes](https://beta.frontmatter.codes/updates/v9.4.0)

Expand Down
3 changes: 3 additions & 0 deletions src/commands/Preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export class Preview {
const cspSource = webView.webview.cspSource;

webView.onDidDispose(() => {
if (crntFilePath && this.webviews[crntFilePath]) {
delete this.webviews[crntFilePath];
}
webView.dispose();
});

Expand Down

0 comments on commit b981ed6

Please sign in to comment.