From b077875822dc70e801d5eaba8341782b45c88708 Mon Sep 17 00:00:00 2001 From: Aleksey Podskrebyshev Date: Sun, 8 Jun 2014 00:45:01 +0400 Subject: [PATCH] fix($ionNavView): prevent read property 'name' of null --- js/angular/directive/navView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/angular/directive/navView.js b/js/angular/directive/navView.js index bcc7f3f8c0e..38c7d33dde2 100644 --- a/js/angular/directive/navView.js +++ b/js/angular/directive/navView.js @@ -125,7 +125,7 @@ function( $ionicViewService, $state, $compile, $controller, $animate) { // to derive our own qualified view name, then hang our own details // off the DOM so child directives can find it. var parent = element.parent().inheritedData('$uiView'); - if (name.indexOf('@') < 0) name = name + '@' + (parent ? parent.state.name : ''); + if (name.indexOf('@') < 0) name = name + '@' + ((parent && parent.state) ? parent.state.name : ''); var view = { name: name, state: null }; element.data('$uiView', view);