Skip to content

Commit 3a6c174

Browse files
committed
fix: 修复appScheme、appLink为undefined时应用无法启动的Bug
1 parent c01aa6a commit 3a6c174

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/uni-app-plus/src/x/framework/app/initAppLaunch.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ export function initAppLaunch(appVm: ComponentPublicInstance) {
2424
const schemaLink = app.getLaunchOptionsSync()
2525

2626
const launchOption = extend({}, args, {
27-
appScheme: schemaLink.appScheme.length === 0 ? null : schemaLink.appScheme,
28-
appLink: schemaLink.appLink.length === 0 ? null : schemaLink.appLink,
27+
// TODO 确认类型appScheme的类型,目前会出现undefined
28+
appScheme: !schemaLink.appScheme ? null : schemaLink.appScheme,
29+
appLink: !schemaLink.appLink ? null : schemaLink.appLink,
2930
})
3031

3132
// onLaunchOption

0 commit comments

Comments
 (0)