From f8bb7c8b4d125d015007e1d2c6d30cb862582171 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 11 Sep 2024 11:51:20 +0200 Subject: [PATCH] fix(files): Make `openMenu` watcher null safe Signed-off-by: Ferdinand Thiessen --- apps/files/src/components/FileEntryMixin.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index a43cab13575..d1ada122714 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -229,9 +229,11 @@ export default defineComponent({ return } // Reset any right menu position potentially set - const root = this.$el?.closest('main.app-content') as HTMLElement - root.style.removeProperty('--mouse-pos-x') - root.style.removeProperty('--mouse-pos-y') + const root = document.getElementById('app-content-vue') + if (root !== null) { + root.style.removeProperty('--mouse-pos-x') + root.style.removeProperty('--mouse-pos-y') + } }, 300) } },