Aurelien Bruno a337ebcf0d
update getObjectProperty(msg,expr)
update getObjectProperty(msg,expr) to support invalid expression to return undefined instead of crashing

Quick Check 

m = {a:{b:{c:{d:{e:"hello"}}}}};

console.log(getMessageProperty(m,"a.b.c.d"))
console.log(getMessageProperty(m,"a.j.c.d"))

{ e: 'hello' }
undefined

instead of with current code 

        result = ( typeof obj[key] !== "undefined" ? obj[key] : undefined);
                              ^

TypeError: Cannot read property 'c' of undefined
2019-12-02 22:29:19 +01:00
..
2019-12-02 22:29:19 +01:00
2018-10-25 11:18:13 +01:00
2018-12-05 13:00:25 +00:00
2018-08-21 13:57:59 +01:00
2019-10-27 21:22:20 +00:00
2018-08-21 13:43:11 +01:00

@node-red/util

Node-RED utilities module.

This provides common utilities shared by the Node-RED components.

Source

The main Node-RED modules are maintained as a monorepo on GitHub.