Skip to content

Navigation error when using clearHistory: true: `ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'peekState' of undefined #2232

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

Closed
bellalMohamed opened this issue Aug 25, 2020 · 1 comment

Comments

@bellalMohamed
Copy link
Contributor

Environment

  • CLI: 6.8.0
  • Cross-platform modules:
  • Android Runtime: 6.5.3
  • Plugin(s):
  • NativeScript-Angular: ~9.0.0
  • Angular: ~9.1.0

Describe the bug
Navigation stuck after navigating from a page with clearHistory: true
If we have 3 pages A, B, C when navigating from Page A to page B with clearHistory: true then trying to navigate to page C this error occurs ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'peekState' of undefined after debugging I found that it's due too not founding an outlet inside when calling the function getOutletByFrame inside ns-location-strategy.js file, so there should be a default outlet if there's no matching outlet.

To Reproduce
Create fresh Angular 9 project and create 3 pages as mentioned

Pull request attached to fix this issue

@bellalMohamed
Copy link
Contributor Author

Closed for #2233

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

1 participant