Skip to content

Commit 2252c5c

Browse files
authored
fix(vue): Prioritize app variable to avoid duplicate name pollution (#4437)
Improve the judgment priority of variable `app` to avoid duplicate name pollution caused by global variable Vue. Fixes Vue 3 external recognition error.
1 parent 1219b75 commit 2252c5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/vue/src/sdk.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ export function init(
4949
return;
5050
}
5151

52-
if (options.Vue) {
53-
vueInit(options.Vue, options);
54-
} else if (options.app) {
52+
if (options.app) {
5553
const apps = Array.isArray(options.app) ? options.app : [options.app];
5654
apps.forEach(app => vueInit(app, options));
55+
} else if (options.Vue) {
56+
vueInit(options.Vue, options);
5757
}
5858
}
5959

0 commit comments

Comments
 (0)