mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
f401d6f3e5
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
18 lines
398 B
JavaScript
18 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;
|
|
}
|
|
});
|