mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
d52989c982
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
19 lines
398 B
JavaScript
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;
|
|
}
|
|
});
|