From e406cd029ad1ad4df5b3e6d2fa9d3d9bd568cb1f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 3 Mar 2022 16:05:59 +0100 Subject: [PATCH] ensure editor has its state updated --- apps/remix-ide/src/app/editor/editor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index a50b5fd8b6..774b0ab321 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -144,6 +144,11 @@ class Editor extends Plugin { this.currentThemeType = theme.quality this.renderComponent() }) + this.on('fileManager', 'fileClosed', (name) => { + if (name === this.currentFile) { + this.currentFile = null + } + }) try { this.currentThemeType = (await this.call('theme', 'currentTheme')).quality } catch (e) {