diff --git a/utils/lib.js b/utils/lib.js index 96629c5..11c63cb 100644 --- a/utils/lib.js +++ b/utils/lib.js @@ -4,10 +4,10 @@ console.log('Load lib module'); function compare(a, b, operator) { // Hint: a = currentState, b = targetState - let logMsg = a + ', ' + b + ' with operator ' + operator; + let logMsg = ''; let returnValue = undefined; try { - logMsg = 'Quantity comparison of ' + logMsg; + logMsg = 'Quantity comparison of ' + a + ', ' + b + ' with operator ' + operator; switch (operator) { case '==': returnValue = a.equal(b); @@ -29,7 +29,7 @@ function compare(a, b, operator) { break; } } catch(e) { - logMsg = 'Standard comparison of ' + logMsg; + logMsg = 'Standard comparison of ' + a + ', ' + b + ' with operator ' + operator; switch (operator) { case '==': returnValue = (a == b);