summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index b60c8f3ca..fd21d17ef 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1386,7 +1386,8 @@ proc createObjInitList(p: PProc, typ: PType, excludedFieldIDs: IntSet, output: v
     if output.len > 0: output.add(", ")
     addf(output, "m_type: $1" | "'m_type' => $#", [genTypeInfo(p, t)])
   while t != nil:
-    createRecordVarAux(p, t.skipTypes(skipPtrs).n, excludedFieldIDs, output)
+    t = t.skipTypes(skipPtrs)
+    createRecordVarAux(p, t.n, excludedFieldIDs, output)
     t = t.sons[0]
 
 proc arrayTypeForElemType(typ: PType): string =