kai-jacobsen/kontentblocks

View on GitHub
js/src/shared/ModuleBrowser/ModuleDefinitionModel.js

Summary

Maintainability
A
0 mins
Test Coverage
//KB.Backbone.ModuleDefinition
module.exports = Backbone.Model.extend({
  initialize: function () {
    var that = this;
    this.id = (function () {
      if (that.get('settings').category === 'template') {
        return that.get('mid');
      } else {
        return that.get('settings').class;
      }
    }());
  }
});