From 2ade833fd49dfee9f98380145a4f2f7ad0e72816 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:22:20 +0100 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 268f28d..3b43b03 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ export const getQuarkLocaleCode = (language) => { export const getDatabaseLocaleCode = (language) => { const toReturn = locales[language]?.id; - if (!toReturn) throw new Error(`Language ${language} not found`); + if (typeof toReturn !== "number") throw new Error(`Language ${language} not found`); return toReturn; };