diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/helpers/files.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/helpers/files.js b/src/helpers/files.js index d48401950..551670052 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -229,12 +229,16 @@ const FilesWorkspacePlugin = { }, open(data) { + const previous = this.vm.file + const id = parseInt(data.id) this.vm.file = { ...data, - id: parseInt(data.id), + id, + } + if (previous?.id !== id) { + // Editor loads new file. Wait for it to be ready. + this.vm.ready = false } - // waiting for the editor to be ready - this.vm.ready = false }, } |