You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib.coffee
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -107,11 +107,16 @@ class globals.Document
107
107
108
108
iffield.isArray
109
109
thrownewError"Document does not match schema, not an array"unless_.isArray obj[name]
110
-
obj[name] =_.map obj[name], (o) =>newfield.targetDocument o
110
+
obj[name] =_.map obj[name], (o) =>
111
+
if o instanceoffield.targetDocument
112
+
o
113
+
else
114
+
newfield.targetDocument o
111
115
else
112
116
thrownewError"Document does not match schema, ancestorArray does not match: #{field.ancestorArray} vs. #{ ancestorArray }"iffield.ancestorArrayisnt ancestorArray
113
117
thrownewError"Document does not match schema, not a plain object"unlessisPlainObject obj[name]
0 commit comments