From df5e61c341c785888b1d26d16cefa74209adcdbe Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 5 Dec 2023 11:47:26 +0100 Subject: [PATCH] Handle null file in RichWorkspace header Signed-off-by: Louis Chemineau --- src/views/RichWorkspace.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 5730d52957e..234a5375fe0 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -80,7 +80,7 @@ export default { }, data() { return { - // Keep track of a local copy of the hasRichWorkspace state as it might change after intitial rendering (e.g. when adding/removing the readme) + // Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme) localHasRichWorkspace: false, focus: false, folder: null, @@ -225,7 +225,7 @@ export default { } }, onFileDeleted(node) { - if (node.path === this.file.path) { + if (node.path === this.file?.path) { this.localHasRichWorkspace = false } },