avoid null ref if mount redraw runs midway route init

This commit is contained in:
Leo Horie 2016-12-05 11:35:50 -05:00
parent 809d8921c9
commit b11f54b919
3 changed files with 44 additions and 44 deletions

View file

@ -16,7 +16,7 @@ module.exports = function($window, redrawService) {
render()
}
var render = function() {
redrawService.render(root, current.resolver.render(Vnode(current.component, current.params.key, current.params)))
if (current.resolver != null) redrawService.render(root, current.resolver.render(Vnode(current.component, current.params.key, current.params)))
}
routeService.defineRoutes(routes, function(component, params, path) {
if (component.view) update({}, component, params, path)