mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Return early on promise reject.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user