computed value becomes undefined
inside onUnmounted
hook unless it's accessed before
#3099
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
🐞 bug
Something isn't working
scope: reactivity
Version
3.0.5
Reproduction link
https://codesandbox.io/s/priceless-lalande-eh4wx?file=/src/views/Home.vue
Steps to reproduce
undefined
.console.log(computedObj.value)
right above theonUnmounted
hook. The value becomes visible insideonMountedhook
.What is expected?
Not sure. Is this expected?
What is actually happening?
Not sure. I think it would be OK for
computed
or any other reactive value to beundefined
insideonUnmounted
, but I think it would be better to have consistent behavior.The text was updated successfully, but these errors were encountered: