Hey Guys.
I think I found a bug on switch node when using it to check if a object has a Key.
Description:
Switch node becomes irresponsive after failing to find a key if parent property does not exist. It throws this error "TypeError: Cannot read property 'hasOwnProperty' of undefined" and Next msg(s) are not analysed and previously corrected filtered msgs no longer passes.
The switch node starts working again only after a full Deploy.
I created a small flow to share.
[{"id":"c5d1a536.8c2938","type":"inject","z":"65d06ce2.1c9964","name":"Error","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"summary\":\"Some text\",\"start\":{\"dateTime\":\"2021-03-01T09:30:00-03:00\"},\"end\":{\"dateTime\":\"2021-03-01T11:30:00-03:00\"},\"id\":\"2ujkh1r4886d51n3p49d8pk66c\"},{\"summary\":\"Some other text\",\"start\":{\"dateTime\":\"2021-03-01T09:30:00-03:00\"},\"end\":{\"dateTime\":\"2021-03-01T11:30:00-03:00\"},\"id\":\"2ja2h8v5usvfb0aeagn8hsjtlc\"},{\"summary\":\"No more meeting please\",\"end\":{\"dateTime\":\"2021-03-01T16:00:00-03:00\"},\"id\":\"1kn7r1rtop70d3nn9ddac5t9f1\"}]","payloadType":"json","x":330,"y":260,"wires":[["1e689a44.a03696"]]},{"id":"c5628ea1.a33d8","type":"switch","z":"65d06ce2.1c9964","name":"","property":"payload.start","propertyType":"msg","rules":[{"t":"hask","v":"dateTime","vt":"str"}],"checkall":"true","repair":true,"outputs":1,"x":680,"y":200,"wires":[["44a9abf5.2277c4"]]},{"id":"c69cb29f.c0ff9","type":"debug","z":"65d06ce2.1c9964","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1030,"y":200,"wires":[]},{"id":"1e689a44.a03696","type":"split","z":"65d06ce2.1c9964","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":530,"y":200,"wires":[["c5628ea1.a33d8"]]},{"id":"44a9abf5.2277c4","type":"join","z":"65d06ce2.1c9964","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":840,"y":200,"wires":[["c69cb29f.c0ff9"]]},{"id":"c4b8e425.987c48","type":"inject","z":"65d06ce2.1c9964","name":"No error","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"summary\":\"Some text\",\"start\":{\"dateTime\":\"2021-03-01T09:30:00-03:00\"},\"end\":{\"dateTime\":\"2021-03-01T11:30:00-03:00\"},\"id\":\"2ujkh1r4886d51n3p49d8pk66c\"},{\"summary\":\"Some other text\",\"start\":{\"dateTime\":\"2021-03-01T09:30:00-03:00\"},\"end\":{\"dateTime\":\"2021-03-01T11:30:00-03:00\"},\"id\":\"2ja2h8v5usvfb0aeagn8hsjtlc\"},{\"summary\":\"No more meeting please\",\"start\":{\"dateTime\":\"2021-03-01T14:00:00-03:00\"},\"end\":{\"dateTime\":\"2021-03-01T16:00:00-03:00\"},\"id\":\"1kn7r1rtop70d3nn9ddac5t9f1\"}]","payloadType":"json","x":340,"y":160,"wires":[["1e689a44.a03696"]]},{"id":"b4c7719b.725ef","type":"comment","z":"65d06ce2.1c9964","name":"Last Item of Array does not have \"start\" property","info":"","x":440,"y":300,"wires":[]}]
I can imagine the behavior to be intentional, but for me failing to find parent property should not break the flow