Skip to content

Commit 5ee37a1

Browse files
committed
add error
1 parent c0f7dd8 commit 5ee37a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

website/src/translations.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,8 @@ export const t = (key: string) => {
103103
if (typeof menuTranslations[key] === "string") {
104104
return menuTranslations[key];
105105
}
106-
return menuTranslations[key]();
106+
if (Object.hasOwn(menuTranslations, key)) {
107+
return menuTranslations[key]();
108+
}
109+
throw new Error(`Not translation found for ${key}`);
107110
};

0 commit comments

Comments
 (0)