diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 258fe1cd056..50ec3f3f45a 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -242,6 +242,7 @@ XLF.parse = function (xlfString) { } if (!key) { reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`)); + return; } messages[key] = decodeEntities(val); }); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 7d41c9ae3f9..746c481b262 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -344,6 +344,7 @@ export class XLF { } if (!key) { reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`)); + return; } messages[key] = decodeEntities(val); });