fix exec missing addpayload,

improve switch null test (to include null object)
check mqtt has payload before sending
This commit is contained in:
dceejay
2015-04-14 17:15:56 +01:00
parent 87e537da90
commit d7bdcd69fc
3 changed files with 4 additions and 3 deletions

View File

@@ -28,8 +28,8 @@ module.exports = function(RED) {
'regex': function(a, b) { return (a + "").match(new RegExp(b)); },
'true': function(a) { return a === true; },
'false': function(a) { return a === false; },
'null': function(a) { return typeof a == "undefined"; },
'nnull': function(a) { return typeof a != "undefined"; },
'null': function(a) { return (typeof a == "undefined" || a === null); },
'nnull': function(a) { return (typeof a != "undefined" && a !== null); },
'else': function(a) { return a === true; }
};