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

Cannot read navigateToAmpUrl of null #18512

Closed
sparhami opened this issue Oct 2, 2018 · 0 comments
Closed

Cannot read navigateToAmpUrl of null #18512

sparhami opened this issue Oct 2, 2018 · 0 comments
Assignees

Comments

@sparhami
Copy link

sparhami commented Oct 2, 2018

this.navigation_ is always null when read here:

const a2a =
this.navigation_.navigateToAmpUrl(next.ampUrl, 'content-discovery');

The private field is declared here:

/** @private {?../../../src/service/navigation.Navigation} */
this.navigation_ = null;

But the field is never initialized in the file. This error can be reproduced clicking on a link within an <amp-next-page>.

Since this error happens in a click listener, it will cause other click listeners for the event to not be invoked.

This was broken in #17600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant