Skip to content

Commit

Permalink
fix(mp): 兼容处理微信小程序分包逻辑 ask: 188049
Browse files Browse the repository at this point in the history
  • Loading branch information
DCloud_UNI_BFC committed Sep 13, 2024
1 parent 87f9622 commit 7818436
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/uni-mp-core/src/runtime/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ export function parseApp(
onLaunch(options: App.LaunchShowOption) {
this.$vm = instance // 飞书小程序可能会把 AppOptions 序列化,导致 $vm 对象部分属性丢失
const ctx = (internalInstance as any).ctx as Record<string, any>
if (this.$vm && ctx.$scope) {
if (this.$vm && ctx.$scope && ctx.$callHook) {
// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
// $scope值在微信小程序混合分包情况下存在,额外用$callHook兼容判断处理
return
}
initBaseInstance(internalInstance, {
Expand Down

0 comments on commit 7818436

Please sign in to comment.