Skip to content

Commit

Permalink
Fix panels not disposed if loading of settings failed
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 16, 2024
1 parent fc26a5c commit 9fd8600
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/webview/newMicroPythonProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export class NewMicroPythonProjectPanel {

const settings = Settings.getInstance();
if (!settings) {
panel.dispose();

// TODO: maybe add restart button
void window.showErrorMessage(
"Failed to load settings. Please restart VSCode."
Expand Down
2 changes: 2 additions & 0 deletions src/webview/newProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ export class NewProjectPanel {

const settings = Settings.getInstance();
if (settings === undefined) {
panel.dispose();

// TODO: maybe add restart button
void window.showErrorMessage(
"Failed to load settings. Please restart VSCode."
Expand Down

0 comments on commit 9fd8600

Please sign in to comment.