open-vault/ui/app/transforms/object.js

22 lines
376 B
JavaScript
Raw Normal View History

2018-04-03 14:16:57 +00:00
import $ from 'jquery';
import DS from 'ember-data';
/*
DS.attr('object')
*/
export default DS.Transform.extend({
deserialize: function(value) {
if (!$.isPlainObject(value)) {
return {};
} else {
return value;
}
},
serialize: function(value) {
if (!$.isPlainObject(value)) {
return {};
} else {
return value;
}
},
});