Skip to content

Commit

Permalink
fix($ionNavView): prevent read property 'name' of null
Browse files Browse the repository at this point in the history
Closes #1587
  • Loading branch information
Aleksey Podskrebyshev authored and ajoslin committed Jun 12, 2014
1 parent ca66444 commit 4831f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/angular/directive/navView.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,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);

Expand Down

0 comments on commit 4831f48

Please sign in to comment.