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: cannot read property of undefined #119

Merged
merged 1 commit into from
Jan 30, 2025
Merged

FIX: cannot read property of undefined #119

merged 1 commit into from
Jan 30, 2025

Conversation

ZogStriP
Copy link
Member

When upgrading this component to use the Glimmer topic list, we converted @discourseComputed into value transformers but there's a bit of magic with @discourseComputed when it comes to handling . and null / undefined values.

This ensures the same behaviour and prevents the JS error from happening when creating a new topic from the topic list.

Meta - https://meta.discourse.org/t/349416

When upgrading this component to use the Glimmer topic list, we
converted @discourseComputed into value transformers but there's a bit
of magic with @discourseComputed when it comes to handling `.` and
`null` / `undefined` values.

This ensures the same behaviour and prevents the JS error from happening
when creating a new topic from the topic list.

Meta - https://meta.discourse.org/t/349416
@CvX
Copy link
Contributor

CvX commented Jan 30, 2025

when creating a new topic from the topic list

I'd say the bug is that there's a null-ish topic in the topic list to begin with

@ZogStriP ZogStriP merged commit dd7baa7 into main Jan 30, 2025
4 checks passed
@ZogStriP ZogStriP deleted the fix-undefined branch January 30, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants