Skip to content

Commit

Permalink
Fix undefined user sets
Browse files Browse the repository at this point in the history
  • Loading branch information
Excellify committed Oct 25, 2024
1 parent fab6d59 commit 7a538d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/composable/useCosmetics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ db.ready().then(async () => {
const set = await watchSet(userID, setID);

if (!set) {
delete data.userEmoteMap[userID];

log.warn("<Cosmetics>", "Em ggote Set could not be found", `id=${setID}`);
log.warn("<Cosmetics>", "Emote Set could not be found", `id=${setID}`);
return;
}

Expand Down Expand Up @@ -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<string, SevenTV.ActiveEmote>;
Expand Down

0 comments on commit 7a538d5

Please sign in to comment.