Skip to content

Fix/null undefined validation#8960

Open
jeetsdev wants to merge 3 commits into
processing:mainfrom
jeetsdev:fix/null-undefined-validation
Open

Fix/null undefined validation#8960
jeetsdev wants to merge 3 commits into
processing:mainfrom
jeetsdev:fix/null-undefined-validation

Conversation

@jeetsdev

@jeetsdev jeetsdev commented Jun 25, 2026

Copy link
Copy Markdown

Resolves #8407

Changes:

This PR fixes the parameter validation behavior for noise() in two ways:

  • Fixed the FES so that parameter validation warnings are emitted when all arguments are undefined.
  • Updated noise() to treat null as an invalid argument by returning NaN, preventing it from being implicitly coerced to 0.

Testing:

  • noise(null) triggers a parameter validation warning.
  • noise(null) returns NaN.

PR Checklist

@welcome

welcome Bot commented Jun 25, 2026

Copy link
Copy Markdown

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

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.

[p5.js 2.0 Bug Report]: noise(null) is treated as noise(0) while noise(undefined) errors, and this behaviour is undocumented and inconsistent.

1 participant