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

popTo: Cannot read property 'toString' of undefined. #2167

Closed
luco opened this issue Aug 2, 2017 · 3 comments
Closed

popTo: Cannot read property 'toString' of undefined. #2167

luco opened this issue Aug 2, 2017 · 3 comments

Comments

@luco
Copy link
Contributor

luco commented Aug 2, 2017

I'm using mobx to set which screen should I pop to when I finish a process.

image

When I console what I'm passing to popTo it gives me the correct screen key.
Used to work on beta12 and below.

EDIT

Even with defined string it doesn't work: Actions.popTo('home');

EDIT2

I found that this validation on line 206 on navigationStore.js is the cause of the issue:

if(data.toString()!=='[object Object]'){
return{data:data};
}

Commenting it just worked fine. Should I submit a PR?

@luco luco changed the title [android] popTo: Cannot read property 'toString' of undefined. popTo: Cannot read property 'toString' of undefined. Aug 2, 2017
@aksonov
Copy link
Owner

aksonov commented Aug 2, 2017 via email

@luco
Copy link
Contributor Author

luco commented Aug 2, 2017

@aksonov Thanks!

@aksonov
Copy link
Owner

aksonov commented Aug 2, 2017

Duplicate of #2163

@aksonov aksonov marked this as a duplicate of #2163 Aug 2, 2017
@aksonov aksonov closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants