forked from naskya/firefish
fix: Cannot display About Firefish page if reaction store is empty
This commit is contained in:
parent
7c887421f4
commit
a09b8e4d80
1 changed files with 4 additions and 2 deletions
|
@ -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<HTMLElement>();
|
||||
|
||||
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({
|
||||
|
|
Loading…
Reference in a new issue