vendor/assets/javascripts/modularity.js.coffee in modularity-rails-0.9.0 vs vendor/assets/javascripts/modularity.js.coffee in modularity-rails-0.9.1

- old
+ new

@@ -57,11 +57,11 @@ for methodName, method of mixin_data.mixin do (methodName, method) => unless @[methodName] @[methodName] = => method.apply(@, arguments) # Call constructor function from mixin. - mixin_data.mixin.constructor.apply @, arguments + mixin_data.mixin?.constructor?.apply(@, arguments) # MODULE EVENTS. # Calls the given function when this widget fires the given local event. @@ -78,9 +78,10 @@ # mixin = constructor of Draggable # self = Card @mixin: (mixin, p...) -> + alert("mixin not found") unless mixin @prototype.mixins or= [] @prototype.mixins.push({mixin: mixin, params: p}) # jQuery integration for creating Modules.