Had to IF statements broken on two lines, changed it so it's all on one line

This commit is contained in:
juggledad 2020-10-26 16:49:01 -04:00 committed by GitHub
parent 056429a745
commit 85a74b2e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,7 @@ module.exports = function(RED) {
if (node.low === "") {
node.low = 1
if ('from' in msg) {
if ( (typeof msg.from === 'number')
|| ( (typeof msg.from === 'string') && (!isNaN(Number(msg.from)) ) )) {
if ( (typeof msg.from === 'number') || ( (typeof msg.from === 'string') && (!isNaN(Number(msg.from)) ) )) {
node.low = Number(msg.from)
}
}
@ -26,8 +25,7 @@ module.exports = function(RED) {
if (node.high === "") {
node.high = 10
if ('to' in msg) {
if ( (typeof msg.to === 'number')
|| ( (typeof msg.to === 'string') && (!isNaN(Number(msg.to)) ) )) {
if ( (typeof msg.to === 'number') || ( (typeof msg.to === 'string') && (!isNaN(Number(msg.to)) ) )) {
node.high = Number(msg.to)
}
}