We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f15b5e commit bd5dc69Copy full SHA for bd5dc69
1 file changed
src/Tool/Tool-typescript.jl
@@ -175,6 +175,7 @@ end
175
elseif f[:is_onetomany]
176
elt_type = get_typescript_elt_type(f)
177
str *= indent * "if (_json['$field_name'] != null) {\n"
178
+ str *= indent * " " * "this.$field_name = [];\n"
179
str *= indent * " " * "for (let e of _json['$field_name']) {\n"
180
str *= indent * " " * "this.$field_name.push(new $elt_type(e));\n"
181
str *= indent * " " * "}\n"
@@ -186,6 +187,7 @@ end
186
187
elseif f[:is_vectorofenum]
188
189
190
191
192
str *= indent * " " * "this.$field_name.push(Number($elt_type[e]));\n"
193
0 commit comments