Skip to content

Commit

Permalink
fix(vue): Prioritize app variable to avoid duplicate name pollution (#…
Browse files Browse the repository at this point in the history
…4437)

Improve the judgment priority of variable `app` to avoid duplicate name pollution caused by global variable Vue. Fixes Vue 3 external recognition error.
  • Loading branch information
lh1me committed Jan 21, 2022
1 parent 1219b75 commit 2252c5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vue/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export function init(
return;
}

if (options.Vue) {
vueInit(options.Vue, options);
} else if (options.app) {
if (options.app) {
const apps = Array.isArray(options.app) ? options.app : [options.app];
apps.forEach(app => vueInit(app, options));
} else if (options.Vue) {
vueInit(options.Vue, options);
}
}

Expand Down

0 comments on commit 2252c5c

Please sign in to comment.