1
0
Fork 0
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:
kbparagua 2016-03-24 23:49:54 +08:00
parent 9cf086df22
commit 728e0a621e

View file

@ -37,13 +37,11 @@ Paloma.Engine.prototype = {
var controller = this._buildController();
if (!controller) return;
var action = controller[ this._request.action ];
if (!action) return;
var callbackPerformer = new Paloma.BeforeCallbackPerformer(controller);
callbackPerformer.perform( this._request.action );
action.call(controller);
var method = controller[ this._request.action ];
if (method) method.call(controller);
this._lastRequest.executed = true;
},