fix(page-scroll): fix isDef (#4488)

This commit is contained in:
nemo-shen 2021-09-15 09:48:08 +08:00 committed by GitHub
parent 058a00ed33
commit df2f297541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ export const pageScrollMixin = (scroller: Scroller) =>
detached() { detached() {
const page = getCurrentPage<{ vanPageScroller: Scroller[] }>(); const page = getCurrentPage<{ vanPageScroller: Scroller[] }>();
if (!isDef(page)) { if (isDef(page)) {
page.vanPageScroller = page.vanPageScroller =
page.vanPageScroller?.filter((item) => item !== scroller) || []; page.vanPageScroller?.filter((item) => item !== scroller) || [];
} }