fix undefined

This commit is contained in:
Pete Matsyburka
2026-01-27 20:09:50 +02:00
parent 1e5f55c1d6
commit 5081e387d0
3 changed files with 19 additions and 4 deletions
+9 -1
View File
@@ -180,7 +180,15 @@ export default {
methods: {
scrollToArea (area) {
this.$nextTick(() => {
this.pageRefs[area.page].areaRefs.find((e) => e.area === area).$el.scrollIntoView({ behavior: 'smooth', block: 'center' })
const pageRef = this.pageRefs[area.page]
if (pageRef && pageRef.areaRefs) {
const areaRef = pageRef.areaRefs.find((e) => e.area === area)
if (areaRef && areaRef.$el) {
areaRef.$el.scrollIntoView({ behavior: 'smooth', block: 'center' })
}
}
})
},
setPageRefs (el) {