From bfa9b5d0f67760aaff4524a16ee17101ee56b6a3 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 7a4f4e809f7..4c88cba00b8 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -221,9 +221,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) } }, -- 2.39.5