X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/30cd9b94ad82e3c3e1551fb8688eca6144f4a0f6..b5db2e60c7ee08a0ccd0b8ded776730996c46aeb:/src/fnpjs/actions.js?ds=sidebyside diff --git a/src/fnpjs/actions.js b/src/fnpjs/actions.js index c49373a..f380ed6 100644 --- a/src/fnpjs/actions.js +++ b/src/fnpjs/actions.js @@ -72,10 +72,11 @@ _.extend(Action.prototype, Backbone.Events, { } return this._cache; }, - execute: function() { + execute: function(callback) { var state = this.getState(); + callback = callback || function() {}; if(state.allowed) { - return state.execute.call(this, this.params, this.appObject); + return state.execute.call(this, callback, this.params, this.appObject); } throw new Error('Execution not allowed'); }