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

Add-on review list throws TypeError: Cannot read property 'slug' of undefined #10131

Closed
kumar303 opened this issue Feb 10, 2017 · 1 comment
Closed

Comments

@kumar303
Copy link
Contributor

To reproduce:

Because there is an initialization problem with the AddonReviewList component, you will see this error:

Uncaught (in promise) TypeError: Cannot read property 'slug' of undefined
    at AddonReviewListBase.addonURL (amo-c1a32f32392627cd059b.js:70019)
    at AddonReviewListBase.proxiedMethod (amo-c1a32f32392627cd059b.js:57285)
    at AddonReviewListBase.render (amo-c1a32f32392627cd059b.js:70084)
    at AddonReviewListBase.proxiedMethod (amo-c1a32f32392627cd059b.js:57285)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (amo-c1a32f32392627cd059b.js:24646)
    at ReactCompositeComponentWrapper._renderValidatedComponent (amo-c1a32f32392627cd059b.js:24669)
    at ReactCompositeComponentWrapper.performInitialMount (amo-c1a32f32392627cd059b.js:24209)
    at ReactCompositeComponentWrapper.mountComponent (amo-c1a32f32392627cd059b.js:24105)
    at Object.mountComponent (amo-c1a32f32392627cd059b.js:17207)
    at ReactCompositeComponentWrapper.performInitialMount (amo-c1a32f32392627cd059b.js:24218)
@kumar303
Copy link
Contributor Author

This is a development issue only. It happened because I had disableSSR: true in my config. When reloading, what this does is render everything on the client side. For this specific component, the initial data loader waits on two promises. At the end of each promise, it dispatches a Redux action. On the client, this causes an immediate re-render but on the server the component is only rendered when both promises are complete.

So, yeah, it's probably something we should think about soon because it's stupid and annoying. However, I'm going to close it for now since there are more important things to worry about.

@KevinMind KevinMind transferred this issue from mozilla/addons-frontend May 5, 2024
@KevinMind KevinMind added repository:addons-frontend Issue relating to addons-frontend migration:2024 labels May 5, 2024
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

2 participants