From a32987fc4fe1bfa64edb8155e620706840bf2afa Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 5 Dec 2024 09:16:49 +0100 Subject: [PATCH] fix(files): catch race condition in FilesWorkspaceHeader init Signed-off-by: skjnldsv --- src/helpers/files.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/files.js b/src/helpers/files.js index 0d7fbf018a4..ffc878413a7 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -229,6 +229,11 @@ export const FilesWorkspaceHeader = new Header({ updated(folder, view) { newWorkspaceCreated = false + if (!vm) { + console.warn('No vue instance found for FilesWorkspaceHeader') + return + } + // Currently there is not much use in updating the vue instance props since render is called on every folder change // removing the rendered element from the DOM // This is only relevant if switching to a folder that has no content as then the render function is not called