-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch node crashing if property does not exist #109
Comments
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.
The text was updated successfully, but these errors were encountered: