Skip to content

type-check density option before range validation - #4536

Merged
lovell merged 1 commit into
lovell:mainfrom
metsw24-max:density-type-check
Jun 9, 2026
Merged

type-check density option before range validation#4536
lovell merged 1 commit into
lovell:mainfrom
metsw24-max:density-type-check

Conversation

@metsw24-max

Copy link
Copy Markdown
Contributor

Missing type guard on the density option
Unlike every other numeric input option, density is range-checked with is.inRange but never type-checked, so a numeric string or single-element array (e.g. '50' or [50]) slips through to the native layer instead of being rejected. Added an is.number guard to match the sibling checks and the error message that already promises a number.

@lovell
lovell merged commit e9e86f5 into lovell:main Jun 9, 2026
32 checks passed
@lovell

lovell commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Thank you!

@lovell lovell added this to the v0.35.0 milestone Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants