mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Don't halt when no Paloma controller is found
This commit is contained in:
parent
fc54e48d18
commit
550ed551ea
1 changed files with 8 additions and 4 deletions
12
vendor/assets/javascripts/paloma/engine.js
vendored
12
vendor/assets/javascripts/paloma/engine.js
vendored
|
@ -29,18 +29,22 @@
|
|||
var Controller = this.factory.get(controllerName);
|
||||
|
||||
if (!Controller){
|
||||
return console.warn('Paloma: undefined controller -> ' + controllerName);
|
||||
console.warn('Paloma: undefined controller -> ' + controllerName);
|
||||
continue;
|
||||
}
|
||||
|
||||
var controller = new Controller(request.params);
|
||||
|
||||
if (!controller[action]){
|
||||
return console.warn('Paloma: undefined action <' + action +
|
||||
'> for <' + controllerName + '> controller');
|
||||
console.warn('Paloma: undefined action <' + action +
|
||||
'> for <' + controllerName + '> controller');
|
||||
continue;
|
||||
}
|
||||
|
||||
controller[action]();
|
||||
}
|
||||
|
||||
this.restart();
|
||||
};
|
||||
|
||||
|
||||
|
@ -58,4 +62,4 @@
|
|||
|
||||
Paloma.Engine = Engine;
|
||||
|
||||
})(window.Paloma);
|
||||
})(window.Paloma);
|
||||
|
|
Loading…
Reference in a new issue