Skip to content

Conversation

akolson
Copy link
Member

@akolson akolson commented Oct 10, 2025

…opdown

Summary

This pr adds a defensive on the code for the error reported in sentry as detailed here

References

Fixes #5434

Reviewer guidance

  • Use any of the LanguageDropdowns in any of the pages in studio
  • Ensure no regressions in behavior
  • Check logs to ensure above logs are not reported
  • Regression tests have also been added, so should pass.

@akolson akolson added this to the Studio: October 2025 Patches milestone Oct 10, 2025
@akolson akolson added P2 - normal Priority: Nice to have and removed P1 - important Priority: High impact on UX labels Oct 10, 2025
languageText(item) {
const firstNativeName = item.native_name.split(',')[0].trim();
const nativeName = item?.native_name || '';
const firstNativeName = nativeName.split(',')[0].trim();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think similarly to the node title defensive check, we should be trying to understand why this is happening and whether it's indicative of another issue. I imported shared/leUtils/Languages.js in a Node REPL and all of them had a native_name.

> Array.from(LanguagesMap.values()).filter(l => !l.native_name)
[]

Also, in the Studio database, all languages have it too.
image

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants