I used to do the following to create a NaN
:
I'm pretty sure this worked fine - until recently.
Now (post 3.1) the typedInput
field gets the red error indicating border & the node gets flagged with the red issue triangle.
Is this the intended / preferred way to create a NaN
?
If yes, would you accept a PR to re-enable this functionality ?
I think it still works & it is just a visual thing - did you deploy and test?
While you are at it, you might want to fix up binary 0b0101
, octal 0o17
and hexadecimal input 0x2b1c
I noticed this ā recently and haven't yet raised an issue! (naughty me)
PR is placed - including fixes for binary, octal & hex.
node-red:master
ā ralphwetzel:master
opened 06:09PM - 26 Sep 23 UTC
- [x] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-ā¦ breaking change which adds functionality)
## Proposed changes
Based on a [forum exchange](https://discourse.nodered.org/t/set-number-value-to-nan-in-change-inject-node/81589), this PR extends the validity checks for typedInput fields of type 'number'.
The following additional formats will pass the check:
- `NaN`
- Binary values, e.g.: `0b10101` or `0B11101`
- Octal values, e.g.: `0o1357` or `0O2468`
- Hex values, e.g.: 0x25aF or 0X69Cd
## Checklist
- [x] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
- [x] For non-bugfix PRs, I have discussed this change on the forum/slack team.
- [ ] I have run `npm run test` to verify the unit tests pass
- [ ] I have added suitable unit tests to cover the new/changed functionality
2 Likes
system
Closed
25 November 2023 18:11
4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.