Commit 2b40cec
committed
fix: avoid creating persistent phantom atom for empty-string key when cwd is null
When useGitStatus(null) was called, gitStatusStateAtom('') was evaluated,
permanently registering '' in knownGitStatusCwds and creating a keepAlive
atom that was never garbage collected. Use a static sentinel atom for the
null case to avoid touching the atom family entirely.1 parent c7460b8 commit 2b40cec
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
0 commit comments