From 7c6631b411c8bbc67f0828f07edf9bbc6e293f09 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Wed, 22 Jan 2025 15:55:32 -0600 Subject: [PATCH] fix bug --- src/webpage/i18n.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webpage/i18n.ts b/src/webpage/i18n.ts index 7390b15..6f88895 100644 --- a/src/webpage/i18n.ts +++ b/src/webpage/i18n.ts @@ -129,6 +129,9 @@ function makeWeirdProxy(obj: [string, translation | void] = ["", undefined]) { translations = I18n.translations[I18n.translations.length - 1]; obj[1] = translations; } + if (!translations) { + return; + } const value = translations[input]; if (value) { @@ -157,5 +160,4 @@ type DoTheThing = { }; const proxyClass = makeWeirdProxy() as unknown as typeof I18n & DoTheThing; -proxyClass.permissions.descriptions.ADD_REACTIONS(); export {proxyClass as I18n, langmap};