Simplize deserialize condition #818

Closed
wants to merge 1 commit into from
View
7 packages/ember-data/lib/transforms/json_transforms.js
@@ -65,10 +65,8 @@ DS.JSONTransforms = {
}
return date;
- } else if (serialized === null || serialized === undefined) {
- // if the value is not present in the data,
- // return undefined, not null.
- return serialized;
+ } else if (serialized === undefined) {
+ return undefined;
} else {
return null;
}
@@ -91,7 +89,6 @@ DS.JSONTransforms = {
utcMinutes = date.getUTCMinutes(),
utcSeconds = date.getUTCSeconds();
-
var dayOfWeek = days[utcDay];
var dayOfMonth = pad(utcDayOfMonth);
var month = months[utcMonth];