switch file only if necessary

pull/2120/head
yann300 3 years ago
parent 7fc8a3a490
commit 5bc6cabf29
  1. 3
      apps/remix-ide/src/app/files/fileManager.ts

@ -608,9 +608,10 @@ class FileManager extends Plugin {
this.events.emit('noFileSelected')
} else {
file = this.normalize(file)
await this.saveCurrentFile()
const resolved = this.getPathFromUrl(file)
file = resolved.file
await this.saveCurrentFile()
if (this.currentFile() === file) return
const provider = resolved.provider
this._deps.config.set('currentFile', file)
this.openedFiles[file] = file

Loading…
Cancel
Save