diff --git a/src/platforms/h5/helpers/get-window-offset.js b/src/platforms/h5/helpers/get-window-offset.js index 19695a41f5694616ab5affa7c79627bb0d31dc4d..6137bd3af08781b8eac4f00171d169aaa765b458 100644 --- a/src/platforms/h5/helpers/get-window-offset.js +++ b/src/platforms/h5/helpers/get-window-offset.js @@ -21,10 +21,10 @@ export default function getWindowOffset () { } const app = getApp() if (app) { - bottom = app.$children[0].showTabBar ? TABBAR_HEIGHT : 0 + bottom = app.$children[0] && app.$children[0].showTabBar ? TABBAR_HEIGHT : 0 } return { top, bottom } -} +}