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

Fix client side exception with list.tsx #61912

Closed
wants to merge 1 commit into from

Conversation

aumbriac
Copy link

Fix for Application error: a client-side exception has occurred (see the browser console for more information). by ensuring the comments array has a valid length prior to attempting to map through it.

Fix for `Application error: a client-side exception has occurred (see the browser console for more information).` by ensuring the `comments` array has a valid length prior to attempting to map through it.
@aumbriac aumbriac requested review from a team as code owners February 11, 2024 14:51
@aumbriac aumbriac requested review from timeyoutakeit and lydiahallie and removed request for a team February 11, 2024 14:51
@ijjk ijjk added the examples Issue/PR related to examples label Feb 11, 2024
@balazsorban44
Copy link
Member

balazsorban44 commented Feb 12, 2024

Based on

It looks like the comments type is guaranteed to be an array. A .map-ing 0-length array should not cause the mentioned issue.

On the other hand, the comments type is optional, so comments.length actually might cause a runtime issue, if comments is undefined.

I suggest opening a bug report first if you experience an issue.

@aumbriac
Copy link
Author

Based on

It looks like the comments type is guaranteed to be an array. A .map-ing 0-length array should not cause the mentioned issue.

On the other hand, the comments type is optional, so comments.length actually might cause a runtime issue, if comments is undefined.

I suggest opening a bug report first if you experience an issue.

I opened a bug report here: #61941

FYI, this issue is occurring in production: https://blog-with-comment.vercel.app/posts/prancing-pony

Have a nice day :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants