From 7a538d5222f8f8a06458ca56a563b09529257738 Mon Sep 17 00:00:00 2001 From: Excellify Date: Fri, 25 Oct 2024 20:40:33 +0200 Subject: [PATCH] Fix undefined user sets --- src/composable/useCosmetics.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/composable/useCosmetics.ts b/src/composable/useCosmetics.ts index 267f8e3b..d686670a 100644 --- a/src/composable/useCosmetics.ts +++ b/src/composable/useCosmetics.ts @@ -260,9 +260,7 @@ db.ready().then(async () => { const set = await watchSet(userID, setID); if (!set) { - delete data.userEmoteMap[userID]; - - log.warn("", "Em ggote Set could not be found", `id=${setID}`); + log.warn("", "Emote Set could not be found", `id=${setID}`); return; } @@ -320,6 +318,7 @@ db.ready().then(async () => { export function useCosmetics(userID: string) { if (!data.userBadges[userID]) data.userBadges[userID] = new CosmeticMap(); if (!data.userPaints[userID]) data.userPaints[userID] = new CosmeticMap(); + if (!data.userEmoteSets[userID]) data.userEmoteSets[userID] = new Map(); if (!data.userEmoteMap[userID]) data.userEmoteMap[userID] = computed(() => { const un = {} as Record;