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

bug: menu component npe #30216

Open
jacobg opened this issue Feb 26, 2025 · 1 comment
Open

bug: menu component npe #30216

jacobg opened this issue Feb 26, 2025 · 1 comment
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author

Comments

@jacobg
Copy link

jacobg commented Feb 26, 2025

My app's error monitoring reports the following error callstack:

TypeError Cannot read properties of undefined (reading 'offsetWidth') 
    https://localhost/assets/index-fYpPZuaS.js:1031:14144 x2.contentId.loadAnimation
    https://localhost/assets/index-fYpPZuaS.js:1031:15072 x2.contentId.onWillStart
    https://localhost/assets/index-fYpPZuaS.js:1031:12344 onWillStart
    https://localhost/assets/index-fYpPZuaS.js:1057:2485 x
    https://localhost/assets/index-fYpPZuaS.js:1057:2351 HTMLDocument.L

That corresponds to the following line of code:

const width = this.menuInnerEl!.offsetWidth;

So it seems the code needs to handle the possibility of menuInnerEl being undefined.

@ionitron-bot ionitron-bot bot added the triage label Feb 26, 2025
@jacobg jacobg changed the title menu component npe bug: menu component npe Feb 26, 2025
@brandyscarney brandyscarney added ionitron: needs reproduction a code reproduction is needed from the issue author and removed triage labels Mar 3, 2025
Copy link

ionitron-bot bot commented Mar 3, 2025

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author
Projects
None yet
Development

No branches or pull requests

2 participants