Skip to content

Commit c7f7d31

Browse files
committed
this may fix a major bug introduced in pr #8437 in the store
1 parent c68d481 commit c7f7d31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/packages/next/components/store/quota-query-params.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ export function encodeRange(
2828
if (start == null || end == null) {
2929
return "";
3030
}
31-
return `${new Date(start).toISOString()}_${new Date(end).toISOString()}`;
31+
try {
32+
return `${new Date(start).toISOString()}_${new Date(end).toISOString()}`;
33+
} catch {
34+
// there are a LOT of values for start/end that would throw an error above, e.g., "undefined".
35+
return "";
36+
}
3237
}
3338

3439
// the inverse of encodeRange

0 commit comments

Comments
 (0)