diff --git a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js index 23cae5f2873c336a3a0eb76d03a03a9331c3870e..dbaf8fecd82d768e0275d078ff92eaefaf252925 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js @@ -24,7 +24,7 @@ function getTabBarPages (appJson) { } function isTabBarPage (pathName, tabBarPages) { - return tabBarPages && tabBarPages.find(item => item.pagePath === pathName) + return Array.isArray(tabBarPages) && tabBarPages.find(item => item.pagePath === pathName) } function parseEntryPagePath (appJson, manifestJson) { @@ -89,7 +89,7 @@ module.exports = function (appJson, manifestJson, { path: entryPagePath + '.js' + (appJson.entryPageQuery || '') } const tabBar = manifestJson.plus.tabBar - if (isTabBarPage(entryPagePath, tabBar.list)) { + if (tabBar && isTabBarPage(entryPagePath, tabBar.list)) { tabBar.child = ['lauchwebview'] } } else {