We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The usernameToColor function in the Avatar component sometimes fails with this error in the Calendar app:
usernameToColor
Avatar
TypeError: username is null usernameToColor Avatar.js:3552 avatarStyle Avatar.js:509 VueJS 4 render Avatar.js:2087 VueJS 5 vue.runtime.esm.js:1888 VueJS 96 tasks calendars.js:376 appendTasksToCalendar calendars.js:371 wrappedMutationHandler vuex.esm.js:844 commitIterator vuex.esm.js:466 commit vuex.esm.js:465 _withCommit vuex.esm.js:624 commit vuex.esm.js:464 boundCommit vuex.esm.js:409 getTasksFromCalendar calendars.js:658 wrappedActionHandler vuex.esm.js:851 dispatch vuex.esm.js:516 boundDispatch vuex.esm.js:406 fetchTasks App.vue:98 fetchTasks App.vue:98 beforeMount App.vue:88 VueJS 16 <anonym> main.js:74 <anonym> tasks-main.js:204201 <anonym> tasks-main.js:204203
The Avatar component is used like this: https://github.com/nextcloud/calendar/blob/master/src/components/Shared/CalendarPickerOption.vue#L34-L41 It seems the avatars are rendered correctly in the end.
Happens with nextcloud-vue latest master 5653d19
The text was updated successfully, but these errors were encountered:
I turns out I was using it wrong. When no user was found, I set the display-name prop to null, but the Avatar component only checks for undefined.
display-name
null
undefined
When instead providing undefined, no error is thrown, see nextcloud/tasks#1576. Hence, I close this issue.
However, I wonder whether the Avatar component should also check for null and treat it as undefined? @skjnldsv
Sorry, something went wrong.
Sure, I see no issues with that 🤔
No branches or pull requests
The
usernameToColor
function in theAvatar
component sometimes fails with this error in the Calendar app:The
Avatar
component is used like this: https://github.com/nextcloud/calendar/blob/master/src/components/Shared/CalendarPickerOption.vue#L34-L41It seems the avatars are rendered correctly in the end.
Happens with nextcloud-vue latest master 5653d19
The text was updated successfully, but these errors were encountered: