fix(nc): Ignore empty arrays when generating code

This commit is contained in:
Michał Tyndel 2022-02-10 13:35:45 +01:00 committed by Julius Pfrommer
parent 1109c86b9e
commit 6af2fa6f39

View File

@ -169,6 +169,8 @@ def generateNodeValueCode(prepend , node, instanceName, valueName, global_var_co
code = []
if idxList is None:
raise Exception("No index was passed and the code generation cannot generate the array element")
if len(node) == 0:
return "\n".join(code)
# Code generation for structure arrays with fields of type Buildin.
# Example:
# Structure []