From 860bda8921e3fec414bed4b41aa9cadf98942d24 Mon Sep 17 00:00:00 2001 From: Nanaka Hiira Date: Sat, 2 Mar 2024 14:01:05 +0900 Subject: [PATCH] fix (client): unable to open about-firefish if reaction store is empty --- packages/client/src/pages/about-firefish.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/about-firefish.vue b/packages/client/src/pages/about-firefish.vue index 0af7ac1f96..dcd39b975b 100644 --- a/packages/client/src/pages/about-firefish.vue +++ b/packages/client/src/pages/about-firefish.vue @@ -92,7 +92,7 @@ import FormSection from "@/components/form/section.vue"; import MkButton from "@/components/MkButton.vue"; import { physics } from "@/scripts/physics"; import { i18n } from "@/i18n"; -import { defaultStore } from "@/store"; +import { defaultStore, defaultReactions } from "@/store"; import * as os from "@/os"; import { definePageMetadata } from "@/scripts/page-metadata"; import icon from "@/scripts/icon"; @@ -103,7 +103,10 @@ const easterEggEngine = ref(null); const containerEl = ref(); function iconLoaded() { - const emojis = defaultStore.state.reactions; + const emojis = + defaultStore.state.reactions.length > 0 + ? defaultStore.state.reactions + : defaultReactions; const containerWidth = containerEl.value?.offsetWidth; for (let i = 0; i < 32; i++) { easterEggEmojis.value.push({