diff --git a/src/equicordplugins/globalBadges/index.tsx b/src/equicordplugins/globalBadges/index.tsx index ca7a28cf..9aeba5bc 100644 --- a/src/equicordplugins/globalBadges/index.tsx +++ b/src/equicordplugins/globalBadges/index.tsx @@ -52,7 +52,8 @@ const fetchBadges = (id: string): BadgeCache["badges"] | undefined => { .then(body => { cache.set(id, { badges: body, expires: Date.now() + EXPIRES }); return body; - }); + }) + .catch(() => null); } else if (cachedValue) { return cachedValue.badges; } diff --git a/src/equicordplugins/userpfp/index.tsx b/src/equicordplugins/userpfp/index.tsx index 2049f0ee..340a2f80 100644 --- a/src/equicordplugins/userpfp/index.tsx +++ b/src/equicordplugins/userpfp/index.tsx @@ -75,7 +75,10 @@ export default definePlugin({ return data.avatars[user.id] ?? original(user, animated, size); }, async start() { - const res = await fetch(settings.store.urlForDB); - if (res.ok) this.data = data = await res.json(); + const res = await fetch(settings.store.urlForDB) + .then(async res => { + if (res.ok) this.data = data = await res.json(); + }) + .catch(() => null); } });