From b3e8ea1e4a6a029e143ee223811d47c6a1a46e9b Mon Sep 17 00:00:00 2001 From: alexandercerutti Date: Tue, 11 Sep 2018 19:25:33 +0200 Subject: [PATCH] Added check in localize for lang --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index aed1d20..90a47ab 100644 --- a/index.js +++ b/index.js @@ -163,7 +163,7 @@ class Pass { */ localize(lang, translations) { - if (typeof translations === "object" || translations === undefined) { + if (lang && typeof lang === "string" && (typeof translations === "object" || translations === undefined)) { this.l10n[lang] = translations || {}; }