From 9bfa8dc4177964ff845bba6cd47f278acee93cbc Mon Sep 17 00:00:00 2001 From: Lhcfl Date: Thu, 4 Apr 2024 15:51:43 +0800 Subject: [PATCH] fix type errors in MkEmoji --- packages/client/src/components/global/MkEmoji.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/client/src/components/global/MkEmoji.vue b/packages/client/src/components/global/MkEmoji.vue index 69d6e0dec1..1e8abbb650 100644 --- a/packages/client/src/components/global/MkEmoji.vue +++ b/packages/client/src/components/global/MkEmoji.vue @@ -4,16 +4,16 @@ class="mk-emoji custom" :class="{ normal, noStyle }" :src="url" - :alt="alt" - :title="alt" + :alt="alt || undefined" + :title="alt || undefined" decoding="async" /> {{ char }} @@ -50,6 +50,7 @@ const customEmoji = computed(() => : null, ); const url = computed(() => { + if (!customEmoji.value) return undefined; if (char.value) { return char2filePath(char.value); } else {