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

cc-header-orga: error when the orga name starts with spaces #886

Closed
florian-sanders-cc opened this issue Nov 15, 2023 · 0 comments · Fixed by #882 or #876
Closed

cc-header-orga: error when the orga name starts with spaces #886

florian-sanders-cc opened this issue Nov 15, 2023 · 0 comments · Fixed by #882 or #876
Assignees
Labels
bug Something isn't working

Comments

@florian-sanders-cc
Copy link
Contributor

Context

In the console, we fixed an issue with orga names starting with spaces.
When orga names started with spaces, it triggered weird displays in the console menu and it triggered an error in the cc-header-orga component

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toUpperCase')
    at cc-header-orga.js:60:90
    at Array.map (<anonymous>)
    at Object.render (cc-header-orga.js:60:76)
    at Object.update (lit-element.ts:160:24)
    at Object.performUpdate (reactive-element.ts:1331:14)
    at Object.scheduleUpdate (reactive-element.ts:1263:17)
    at Object.__enqueueUpdate (reactive-element.ts:1235:25)

We fixed this in the console by using trim on orga names when they are edited and doing the same in db for existing orgas.

Still, it would be best if the component could handle this issue, just in case.

Solution

Trim the orga name when getting the initials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant