From fa803c017c92f7afe31d12fd9e674925a935414f Mon Sep 17 00:00:00 2001 From: PhantomMantis Date: Sat, 6 Apr 2024 14:50:11 -0600 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=F0=9F=90=9B=20users=20without?= =?UTF-8?q?=20token=20no=20longer=20cause=20error=20on=20scan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/admin/components/Users/UserList/UserItem.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/wizarr-frontend/src/modules/admin/components/Users/UserList/UserItem.vue b/apps/wizarr-frontend/src/modules/admin/components/Users/UserList/UserItem.vue index 75b278737..848dc49cf 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Users/UserList/UserItem.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Users/UserList/UserItem.vue @@ -66,8 +66,8 @@ export default defineComponent({ }, data() { return { - profilePicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username[0], - backupPicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username[0], + profilePicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username, + backupPicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username, disabled: { delete: false, }, @@ -103,6 +103,9 @@ export default defineComponent({ }, methods: { async getProfilePicture() { + if (!this.user.username) { + return; + } const response = this.$axios.get(`/api/users/${this.user.token}/profile-picture`, { responseType: "blob", });