Repository navigation
Commit c04019d
committed
fix(app): hoist navigate out of removeSessions produce callback
Gemini code review on PR #26 flagged that removeSessions ran
navigate() inside the Immer produce callback, which is unsafe — produce
should be pure mutation only, and triggering routing during the store
write phase can cause race conditions and double-renders. removeTab
already followed the correct pattern (compute nextHref inside produce,
navigate outside); mirror it for removeSessions.
Refs: LAC-22811 parent 5993c24 commit c04019d
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
0 commit comments