fix: scrolling to heading if it wasn't available

This commit is contained in:
kolaente 2022-01-18 22:00:13 +01:00
parent 50c3bcd793
commit 1818ed3648
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -595,6 +595,9 @@ export default {
} }
}, },
scrollToHeading() { scrollToHeading() {
if(!this.$refs?.heading?.$el) {
return
}
this.$refs.heading.$el.scrollIntoView({block: 'center'}) this.$refs.heading.$el.scrollIntoView({block: 'center'})
}, },
setActiveFields() { setActiveFields() {