Fix linting

linkcall-timeout
Nick O'Leary 2025-06-06 17:13:41 +01:00
parent 6b20acc0a2
commit ce1d19c05c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 5 additions and 5 deletions

View File

@ -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) {