Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix($ionNavView): prevent read property 'name' of null #1587

Closed
wants to merge 1 commit into from

Conversation

alexpods
Copy link

@alexpods alexpods commented Jun 7, 2014

Sometimes, absolutely spontaneously, I have the error:

TypeError: Cannot read property 'name' of null
    at IonicModule.directive.directive.compile (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:40819:79)
    at nodeLinkFn (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:15111:13)
    at compositeLinkFn (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:14517:15)
    at publicLinkFn (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:14426:30)
    at updateView (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:40883:11)
    at IonicModule.directive.directive.compile.eventHook (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:40827:17)
    at Scope.$get.Scope.$broadcast (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:21142:28)
    at $state.transitionTo.$state.transition.resolved.then.$state.transition (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:33927:22)
    at deferred.promise.then.wrappedCallback (http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:19846:81)
    at http://localhost:8000/ios/www/bower_components/ionic/release/js/ionic.bundle.js:19932:26 <ion-nav-view> 

This happens because of attempt to read 'name' property of parent.state where state=null. Looks like not only me have this error (http://forum.ionicframework.com/t/how-do-i-get-rid-of-this/3674). So it will be good to rid of it.

@perrygovier
Copy link
Contributor

Hey @alexpods, thanks! Could you put together an example reproducing the problem this fixes?

@juliancesar
Copy link

In my case occurs in console with debug mode (android project).

@ajoslin
Copy link
Contributor

ajoslin commented Jun 12, 2014

Looks like a good fix to me.

@ajoslin ajoslin closed this in 50596b8 Jun 12, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Jun 12, 2014

Merged.

By the way, thanks for following the git commit conventions @alexpods!

I'm used to people not writing their commits correctly, but I was happily surprised when I went to fix the commit message and it was already correct!

ajoslin pushed a commit that referenced this pull request Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants