Skip to content

Commit 9ff29a1

Browse files
committed
fix: display vue 3 version
1 parent e93f74e commit 9ff29a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/injected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function analyze () {
1717
}
1818
}
1919
const hasVue = await detectors.hasVue(context)
20-
const vueVersion = (window.$nuxt && window.$nuxt.$root && window.$nuxt.$root.constructor.version) || (window.Vue && window.Vue.version) || [...document.querySelectorAll('*')].map((el) => el.__vue__ && el.__vue__.$root && el.__vue__.$root.constructor.version).filter(Boolean)[0]
20+
const vueVersion = window.$nuxt?.$root?.constructor?.version || window.Vue?.version || [...document.querySelectorAll("*")].map((el) => el.__vue__?.$root?.constructor?.version || el.__vue_app__?.version).filter(Boolean)[0]
2121
const { ssr } = await detectors.getVueMeta(context)
2222
const framework = await detectors.getFramework(context)
2323
const ui = await detectors.getUI(context)

0 commit comments

Comments
 (0)