Skip to content

Commit 438942c

Browse files
committed
fix: follow the rabbit
1 parent 740c3d6 commit 438942c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/utils/charts.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,15 @@ export function createSeededSvgPattern(
890890
const minimumSize = options?.minimumSize ?? 8
891891
const maximumSize = options?.maximumSize ?? 20
892892

893-
if (minimumSize <= 0 || maximumSize <= 0 || minimumSize > maximumSize) {
893+
if (
894+
!Number.isFinite(minimumSize) ||
895+
!Number.isFinite(maximumSize) ||
896+
minimumSize <= 0 ||
897+
maximumSize <= 0 ||
898+
minimumSize > maximumSize
899+
) {
894900
throw new RangeError(
895-
'minimumSize and maximumSize must be positive, and minimumSize must not exceed maximumSize',
901+
'minimumSize and maximumSize must be finite, positive, and minimumSize must not exceed maximumSize',
896902
)
897903
}
898904

0 commit comments

Comments
 (0)