fix cannot read offset of undefined on anchor component
This commit is contained in:
parent
77a67f5d3f
commit
0f0a9fe610
1 changed files with 3 additions and 1 deletions
|
@ -168,7 +168,9 @@ export default {
|
|||
this.handleScrollTo();
|
||||
this.handleSetInkTop();
|
||||
this.updateTitleOffset();
|
||||
this.upperFirstTitle = this.scrollElement.scrollTop < this.titlesOffsetArr[0].offset;
|
||||
if (this.titlesOffsetArr[0]) {
|
||||
this.upperFirstTitle = this.scrollElement.scrollTop < this.titlesOffsetArr[0].offset;
|
||||
}
|
||||
on(this.scrollContainer, 'scroll', this.handleScroll);
|
||||
on(window, 'hashchange', this.handleHashChange);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue