From 85a74b2e782682382c88c137e779fd3dbba6c440 Mon Sep 17 00:00:00 2001 From: juggledad Date: Mon, 26 Oct 2020 16:49:01 -0400 Subject: [PATCH] Had to IF statements broken on two lines, changed it so it's all on one line --- function/random/random.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/function/random/random.js b/function/random/random.js index 6b2face1..5509cbb4 100644 --- a/function/random/random.js +++ b/function/random/random.js @@ -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) } }