diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-11 11:51:20 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-11 11:54:25 +0200 |
commit | 92135fe3d63466da69019dd95c005a03b395a310 (patch) | |
tree | 80319d6e592dc7ad45bb56d589f4aac2d06a267f | |
parent | 0f153ccb05604e8ab46ea19770cd8431fcf88757 (diff) | |
download | nextcloud-server-92135fe3d63466da69019dd95c005a03b395a310.tar.gz nextcloud-server-92135fe3d63466da69019dd95c005a03b395a310.zip |
fix(files): Make `openMenu` watcher null safe
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r-- | apps/files/src/components/FileEntryMixin.ts | 8 |
1 files 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) } }, |