Ghost/ghost/admin/app/transforms/moment-date.js
Kevin Ansfield d52989c982 deps: ember-data@2.3.2
no issue
- updates ember-data dependency and switches to direct es6 module import instead of destructuring assignment
- fixes issue with `authenticationFailed` action being called before transitions have finished
2016-01-19 14:36:39 +00:00

19 lines
398 B
JavaScript

/* global moment */
import Transform from 'ember-data/transform';
export default Transform.extend({
deserialize(serialized) {
if (serialized) {
return moment(serialized);
}
return serialized;
},
serialize(deserialized) {
if (deserialized) {
return moment(deserialized).toDate();
}
return deserialized;
}
});