From a09b8e4d80afbdf4e89fffba2b5f972a6b442284 Mon Sep 17 00:00:00 2001 From: Nanaka Hiira Date: Mon, 1 Jan 2024 21:34:27 +0900 Subject: [PATCH] fix: Cannot display About Firefish page if reaction store is empty --- packages/client/src/pages/about-firefish.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/about-firefish.vue b/packages/client/src/pages/about-firefish.vue index d52acc3b..0d285e25 100644 --- a/packages/client/src/pages/about-firefish.vue +++ b/packages/client/src/pages/about-firefish.vue @@ -216,7 +216,7 @@ import MkLink from "@/components/MkLink.vue"; import MkSparkle from "@/components/MkSparkle.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"; @@ -235,7 +235,9 @@ 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({