open-vault/ui/app/transforms/object.js
2018-04-03 09:16:57 -05:00

22 lines
376 B
JavaScript

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;
}
},
});