-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Describe the bug
createEffect(() => {
try {
untrack(() => {
throw new Error();
});
} catch (e) {}
console.log(count()); // this will not be reactive, listener is still null internally
});solid/packages/solid/src/reactive/signal.ts
Lines 807 to 816 in 454ed51
| export function untrack<T>(fn: Accessor<T>): T { | |
| let result: T, | |
| listener = Listener; | |
| Listener = null; | |
| result = fn(); | |
| Listener = listener; | |
| return result; | |
| } |
Your Example Website or App
https://playground.solidjs.com/?hash=1765991341&version=1.4.1
Steps to Reproduce the Bug or Issue
see repro
Expected behavior
untrack should also restore listener when throwing.
Screenshots or Videos
No response
Platform
playground
Additional context
No response
reported by: fabiospampinato
Metadata
Metadata
Assignees
Labels
No labels