From e7c5a9a3bca5f64cb764a5c11f90a9626eea1799 Mon Sep 17 00:00:00 2001 From: alexandercerutti Date: Sun, 26 Aug 2018 11:58:08 +0200 Subject: [PATCH] Now location accepts also no translations passed to the function to include the languge --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 95800e1..d3c20eb 100644 --- a/index.js +++ b/index.js @@ -160,8 +160,8 @@ class Pass { */ localize(lang, translations) { - if (typeof translations === "object") { - this.l10n[lang] = translations; + if (typeof translations === "object" || translations === undefined) { + this.l10n[lang] = translations || {}; } return this;