Skip to content

Commit

Permalink
fix(contoller): never stop retry calling controller
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierBoubert committed Nov 8, 2016
1 parent 5f72e85 commit cadaad3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions features/controller/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@
}
}

window.Ractive.fireController = function(name, component, data, el, config, callback, tries) {
tries = tries === false ? tries : (tries || 0) + 1;

window.Ractive.fireController = function(name, component, data, el, config, callback, retry) {
if (_controllers[name]) {
_callControllers(_controllers[name], component, data, el, config, 0, callback);
}
else if (tries !== false && tries < 500) {
else if (retry !== false) {
setTimeout(function() {
window.Ractive.fireController(name, component, data, el, config, callback, tries);
window.Ractive.fireController(name, component, data, el, config, callback, retry);
}, 10);
}
else if (callback) {
Expand Down

0 comments on commit cadaad3

Please # to comment.