fix(files): Make openMenu watcher null safe

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2024-09-11 11:51:20 +02:00
parent 2a5d6bb713
commit eb897b112e
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

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