Closed colinl closed 1 year ago
Thanks for the report and example.
There's a straightforward fix for this in the code generator in nodered2mcu. That should be available later today from the Moddable SDK repository.
All working with the latest Modable SDK
Great, thanks for the quick confirmation.
The ironical thing is, that because it didn't work, I had to find an alternative solution, and actually ended up with a significantly more efficient flow which didn't need the Switch node at all :-)
Very nice. Constraints can necessitate a more thoughtful solution. That's part of what's fun about working on microcontrollers.
If I configure a Switch node to test, for example,
global.mcuTopics.analogue_0.topic
for not null, or not empty, or in fact anything else, I think, then if global.mcuTopics does not exist, the s/w crashes with code such asat the line
let value = ...
with the message "cannot coerce undefined to object!" The normal node-red does not crash, but instead then fails tests such as not empty and not null.