From 32d9ea5d2fd1d916dfc9e54ec51066170be81e9b Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 19 Oct 2021 14:45:59 +0100 Subject: [PATCH] Update file-panel.js Bug fix: closing files when creating workspaces with the API --- apps/remix-ide/src/app/panels/file-panel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 4ed0e6c8c9..f91ef5e2b7 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -251,6 +251,7 @@ module.exports = class Filepanel extends ViewPlugin { if (checkSpecialChars(workspaceName) || checkSlash(workspaceName)) throw new Error('special characters are not allowed') if (await this.workspaceExists(workspaceName)) throw new Error('workspace already exists') else { + await this.call('fileManager', 'closeAllFiles') const workspaceProvider = this._deps.fileProviders.workspace await this.processCreateWorkspace(workspaceName) workspaceProvider.setWorkspace(workspaceName)