mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
Return early on promise reject.
This commit is contained in:
1 parent
ed1118b27b
commit
2022aede92
2 files changed
+2
No files matched your search
@@ -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