Skip to content

Commit 4d38dd2

Browse files
committed
fix(dropdown): fix avatar fallback
1 parent eb79719 commit 4d38dd2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/common/navbar/NavbarSettingsDopdown.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ const toOption = (
6868
label: label ?? i18n(key),
6969
key,
7070
icon: () => {
71-
if (typeof icon === 'string')
71+
if (typeof icon === 'string') {
7272
return h(NAvatar, { src: icon, size: 16, round: true });
73+
}
7374
return h(NIcon, null, { default: () => h(icon) });
7475
},
7576
};
@@ -88,7 +89,11 @@ const options = computed<DropdownProps['options']>(() => {
8889
if (users.value.length) {
8990
return [
9091
...users.value.map(([key, value]) =>
91-
toOption(`user-${key}`, value?.user?.images?.avatar?.full || IconAccount, key),
92+
toOption(
93+
`user-${key}`,
94+
(chromeRuntimeId && value?.user?.images?.avatar?.full) || IconAccount,
95+
key,
96+
),
9297
),
9398
{ type: 'divider', key: 'users-divider' },
9499
...baseOptions,

0 commit comments

Comments
 (0)