diff --git a/src/row/struct.ts b/src/row/struct.ts index 074ec91f..765f519e 100644 --- a/src/row/struct.ts +++ b/src/row/struct.ts @@ -50,7 +50,8 @@ export class StructRow { const keys = parent.type.children; const json = {} as { [P in string & keyof T]: T[P]['TValue'] }; for (let j = -1, n = keys.length; ++j < n;) { - json[keys[j].name as string & keyof T] = getVisitor.visit(parent.children[j], i); + const fieldName = keys[j].name as string & keyof T; + json[fieldName] = getVisitor.visit(parent.children[j], i); } return json; }