We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0600c90 commit ee2977bCopy full SHA for ee2977b
packages/core/useMounted/index.ts
@@ -1,5 +1,5 @@
1
// eslint-disable-next-line no-restricted-imports
2
-import { getCurrentInstance, onMounted, ref } from 'vue-demi'
+import { getCurrentInstance, isVue2, onMounted, ref } from 'vue-demi'
3
4
/**
5
* Mounted state in ref.
@@ -13,7 +13,7 @@ export function useMounted() {
13
if (instance) {
14
onMounted(() => {
15
isMounted.value = true
16
- }, instance)
+ }, isVue2 ? null : instance)
17
}
18
19
return isMounted
0 commit comments