From f33785a09cdb337d437fee656cd91c475d8c893c Mon Sep 17 00:00:00 2001
From: MeiMei <30769358+mei23@users.noreply.github.com>
Date: Sat, 23 Oct 2021 02:44:52 +0900
Subject: Fix #7902 (#7903)

* Fix #7902

* Update notification.vue

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
---
 src/client/components/notification.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/components/notification.vue')

diff --git a/src/client/components/notification.vue b/src/client/components/notification.vue
index bce6333d98..8c2787cf31 100644
--- a/src/client/components/notification.vue
+++ b/src/client/components/notification.vue
@@ -13,7 +13,8 @@
 			<i v-else-if="notification.type === 'mention'" class="fas fa-at"></i>
 			<i v-else-if="notification.type === 'quote'" class="fas fa-quote-left"></i>
 			<i v-else-if="notification.type === 'pollVote'" class="fas fa-poll-h"></i>
-			<XReactionIcon v-else-if="notification.type === 'reaction'" :reaction="notification.reaction" :custom-emojis="notification.note.emojis" :no-style="true"/>
+			<!-- notification.reaction が null になることはまずないが、ここでoptional chaining使うと一部ブラウザで刺さるので念の為 -->
+			<XReactionIcon v-else-if="notification.type === 'reaction'" :reaction="notification.reaction ? notification.reaction.replace(/^:(\w+):$/, ':$1@.:') : notification.reaction" :custom-emojis="notification.note.emojis" :no-style="true"/>
 		</div>
 	</div>
 	<div class="tail">
-- 
cgit v1.2.3-freya

