mirror of https://github.com/node-red/node-red.git
Fix linting
parent
6b20acc0a2
commit
ce1d19c05c
|
@ -40,20 +40,20 @@ RED.validators = {
|
|||
// Allow ${ENV_VAR} value
|
||||
return true
|
||||
}
|
||||
const parsedResult = new Number(v)
|
||||
const parsedResult = Number(v)
|
||||
if (!isNaN(v)) {
|
||||
let isValid = true
|
||||
// This is a number - check for any additional constraints
|
||||
if (Object.hasOwn(options, '>') && !(parsedResult > options['>'])) {
|
||||
if (Object.hasOwn(options, '>') && parsedResult <= options['>']) {
|
||||
isValid = false
|
||||
}
|
||||
if (isValid && Object.hasOwn(options, '>=') && !(parsedResult >= options['>='])) {
|
||||
if (isValid && Object.hasOwn(options, '>=') && parsedResult < options['>=']) {
|
||||
isValid = false
|
||||
}
|
||||
if (isValid && Object.hasOwn(options, '<') && !(parsedResult < options['<'])) {
|
||||
if (isValid && Object.hasOwn(options, '<') && parsedResult >= options['<']) {
|
||||
isValid = false
|
||||
}
|
||||
if (isValid && Object.hasOwn(options, '<=') && !(parsedResult <= options['<='])) {
|
||||
if (isValid && Object.hasOwn(options, '<=') && parsedResult > options['<=']) {
|
||||
isValid = false
|
||||
}
|
||||
if (isValid) {
|
||||
|
|
Loading…
Reference in New Issue