diff --git a/api/router.js b/api/router.js index f4fd93f0..a1f29203 100644 --- a/api/router.js +++ b/api/router.js @@ -25,7 +25,7 @@ module.exports = function($window, redrawService) { if (waiting != null) update(payload, component, params, path) else { waiting = Promise.resolve(payload.onmatch(params, path)) - .then(function() {update(payload, component, params, path)}) + .then(function(comp) {update(payload, comp != null ? comp : component, params, path)}) } } else update(payload, "div", params, path)