fix all tabs closing

pull/2398/head
Aniket-Engg 3 years ago
parent 36e0cdb99f
commit bda94c960f
  1. 4
      apps/remix-ide/src/app/panels/tab-proxy.js

@ -153,6 +153,10 @@ export class TabProxy extends Plugin {
displayName, displayName,
() => this.emit('switchApp', name), () => this.emit('switchApp', name),
() => { () => {
if(name === 'home' && this.loadedTabs.length === 1 && this.loadedTabs[0].id === "home") {
const files = Object.keys(this.editor.sessions)
files.forEach(filepath => this.editor.discard(filepath))
}
this.emit('closeApp', name) this.emit('closeApp', name)
this.call('manager', 'deactivatePlugin', name) this.call('manager', 'deactivatePlugin', name)
}, },

Loading…
Cancel
Save