Commit f97fa62
committed
Fix: Missing null check in LRU cleanup
Unfortunately this field is not strongly typed because it's a cyclic
type and I wasn't able to soundly model it with TypeScript. Skill issue
I'm sure.
Don't have an exact repro yet but the previous code was obviously wrong.
The way this should have been structured regardless is to delete
the wrapper MapEntry object instead of the value it contains. The
non-nullness of the wrapper object _is_ properly typed, and avoids
an unnecessary indirection.
As a follow up, I'll look into how to model this type properly.1 parent 940f889 commit f97fa62
File tree
2 files changed
+3
-3
lines changed- packages/next/src/client/components/segment-cache
2 files changed
+3
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments