New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(useMounted): The second argument in vue2.7 should be undefined
#3830
Conversation
packages/core/useMounted/index.ts
Outdated
@@ -13,7 +13,7 @@ export function useMounted() { | |||
if (instance) { | |||
onMounted(() => { | |||
isMounted.value = true | |||
}, isVue2 ? null : instance) | |||
}, isVue2 ? void 0 : instance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to use undefined
and let bundlers do their job by using void 0
if they want?
It's just my opinion, I prefer to read undefined
, it's seems clearer to me.
Co-authored-by: Glandos <bugs-github@antipoul.fr>
undefined
…ueuse#3830) Co-authored-by: Anthony Fu <github@antfu.me> Co-authored-by: Glandos <bugs-github@antipoul.fr>
Is there any plan for a new vueuse release with this? |
Same, I'm looking forward to seeing this fix released, as I have errors that throw on my Vue2 project due to |
Before submitting the PR, please make sure you do the following
fixes #123
).Description
#3803
Additional context