mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Execute before callbacks even if action method does not exists
This commit is contained in:
parent
9cf086df22
commit
728e0a621e
1 changed files with 2 additions and 4 deletions
6
vendor/assets/javascripts/paloma/engine.js
vendored
6
vendor/assets/javascripts/paloma/engine.js
vendored
|
@ -37,13 +37,11 @@ Paloma.Engine.prototype = {
|
||||||
var controller = this._buildController();
|
var controller = this._buildController();
|
||||||
if (!controller) return;
|
if (!controller) return;
|
||||||
|
|
||||||
var action = controller[ this._request.action ];
|
|
||||||
if (!action) return;
|
|
||||||
|
|
||||||
var callbackPerformer = new Paloma.BeforeCallbackPerformer(controller);
|
var callbackPerformer = new Paloma.BeforeCallbackPerformer(controller);
|
||||||
callbackPerformer.perform( this._request.action );
|
callbackPerformer.perform( this._request.action );
|
||||||
|
|
||||||
action.call(controller);
|
var method = controller[ this._request.action ];
|
||||||
|
if (method) method.call(controller);
|
||||||
|
|
||||||
this._lastRequest.executed = true;
|
this._lastRequest.executed = true;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue