Commit 6f0c829
fix: Notification auto-dismiss not working due to stale closure
The removeNotification function was using a stale reference to the
notifications array from the closure scope, causing the setTimeout
callback to filter against an outdated state.
Changed to use functional update pattern (prev => prev.filter(...))
which correctly references the current state when the timeout fires.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 109bad9 commit 6f0c829
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments