fix(files): Make `openMenu` watcher null safe

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/47891/head
Ferdinand Thiessen 2024-09-11 11:51:20 +07:00
parent 2b5dd11d97
commit 7a345f68dc
1 changed files with 5 additions and 3 deletions

@ -231,9 +231,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)
}
},