mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
fix(page-scroll): skip when page undefined (#4640)
* fix(page-scroll): skip when page undefined * fix: adjust
This commit is contained in:
parent
a7dd166829
commit
e5089f464b
@ -24,6 +24,10 @@ export const pageScrollMixin = (scroller: Scroller) =>
|
||||
attached() {
|
||||
const page = getCurrentPage<{ vanPageScroller: Scroller[] }>();
|
||||
|
||||
if (!isDef(page)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.isArray(page.vanPageScroller)) {
|
||||
page.vanPageScroller.push(scroller.bind(this));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user