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
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

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