refactor: should throw errors in computed getters

This commit is contained in:
Evan You 2024-04-24 17:27:51 +08:00
parent 9fd1284ca4
commit 85f3592725
No known key found for this signature in database
GPG Key ID: B9D421896CA450FB
1 changed files with 6 additions and 5 deletions

View File

@ -375,12 +375,13 @@ export function refreshComputed(computed: ComputedRefImpl) {
}
} catch (err) {
dep.version++
throw err
} finally {
activeSub = prevSub
shouldTrack = prevShouldTrack
cleanupDeps(computed)
computed.flags &= ~EffectFlags.RUNNING
}
activeSub = prevSub
shouldTrack = prevShouldTrack
cleanupDeps(computed)
computed.flags &= ~EffectFlags.RUNNING
}
function removeSub(link: Link) {