quickedit-1.0.x-dev/js/models/BaseModel.js
js/models/BaseModel.js
/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
(function (Drupal, Backbone) {
Drupal.quickedit.BaseModel = Backbone.Model.extend({
initialize: function initialize(options) {
this.__initialized = true;
return Backbone.Model.prototype.initialize.call(this, options);
},
set: function set(key, val, options) {
if (this.__initialized) {
if (_typeof(key) === 'object') {
key.validate = true;
} else {
if (!options) {
options = {};
}
options.validate = true;
}
}
return Backbone.Model.prototype.set.call(this, key, val, options);
}
});
})(Drupal, Backbone);