diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f0ecbb..f9c9c6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,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) diff --git a/src/commands/Preview.ts b/src/commands/Preview.ts index 0f28e902..835b6030 100644 --- a/src/commands/Preview.ts +++ b/src/commands/Preview.ts @@ -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(); });