From e1394d592a69f7a250e1748a5841e49c1e175162 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 14 Sep 2018 14:11:59 +0100 Subject: [PATCH] Allow translation tags object to be a variable Don't try to validate the translation tags if it's not an object literal. --- scripts/gen-i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen-i18n.js b/scripts/gen-i18n.js index fa9ccc8ed7..c35cd3466a 100755 --- a/scripts/gen-i18n.js +++ b/scripts/gen-i18n.js @@ -143,7 +143,7 @@ function getTranslationsJs(file) { // Validate tag replacements if (node.arguments.length > 2) { const tagMap = node.arguments[2]; - for (const prop of tagMap.properties) { + for (const prop of tagMap.properties || []) { if (prop.key.type === 'Literal') { const tag = prop.key.value; // RegExp same as in src/languageHandler.js