File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 175175 elseif f[:is_onetomany ]
176176 elt_type = get_typescript_elt_type (f)
177177 str *= indent * " if (_json['$field_name '] != null) {\n "
178+ str *= indent * " " * " this.$field_name = [];\n "
178179 str *= indent * " " * " for (let e of _json['$field_name ']) {\n "
179180 str *= indent * " " * " this.$field_name .push(new $elt_type (e));\n "
180181 str *= indent * " " * " }\n "
186187 elseif f[:is_vectorofenum ]
187188 elt_type = get_typescript_elt_type (f)
188189 str *= indent * " if (_json['$field_name '] != null) {\n "
190+ str *= indent * " " * " this.$field_name = [];\n "
189191 str *= indent * " " * " for (let e of _json['$field_name ']) {\n "
190192 str *= indent * " " * " this.$field_name .push(Number($elt_type [e]));\n "
191193 str *= indent * " " * " }\n "
You can’t perform that action at this time.
0 commit comments