mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Added check in localize for lang
This commit is contained in:
2
index.js
2
index.js
@@ -163,7 +163,7 @@ class Pass {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
localize(lang, translations) {
|
localize(lang, translations) {
|
||||||
if (typeof translations === "object" || translations === undefined) {
|
if (lang && typeof lang === "string" && (typeof translations === "object" || translations === undefined)) {
|
||||||
this.l10n[lang] = translations || {};
|
this.l10n[lang] = translations || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user