Skip to content

Commit f802cf4

Browse files
committed
Fixed toJs() of the date list property.
1 parent e665cab commit f802cf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/properties.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
results = [];
305305
for (i = 0, len = value.length; i < len; i++) {
306306
x = value[i];
307-
results.push(x != null ? x.toJSON() : null);
307+
results.push(x != null ? new Date(x) : null);
308308
}
309309
return results;
310310
})();

src/lib/properties.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ListProperty extends Property
181181
when BooleanProperty
182182
value = ((if x? then Boolean(x) else null) for x in value)
183183
when DateProperty
184-
value = ((if x? then x.toJSON() else null) for x in value)
184+
value = ((if x? then new Date(x) else null) for x in value)
185185
when ListProperty, ObjectProperty, ReferenceProperty
186186
value = ((if x? then x else null) for x in value)
187187
else

0 commit comments

Comments
 (0)