Skip invalid attachments and make function sync
This commit is contained in:
parent
3dfc823716
commit
add4b11df3
2 changed files with 8 additions and 3 deletions
|
@ -176,7 +176,12 @@ exports._replaceUnicodeOrderOverridesSync = (attachment) => {
|
|||
exports.replaceUnicodeOrderOverrides = async attachment =>
|
||||
exports._replaceUnicodeOrderOverridesSync(attachment);
|
||||
|
||||
exports.removeSchemaVersion = async (attachment) => {
|
||||
exports.removeSchemaVersion = (attachment) => {
|
||||
if (!exports.isValid(attachment)) {
|
||||
console.log('Attachment.removeSchemaVersion: Invalid input attachment:', attachment);
|
||||
return attachment;
|
||||
}
|
||||
|
||||
const attachmentWithoutSchemaVersion = Object.assign({}, attachment);
|
||||
delete attachmentWithoutSchemaVersion.schemaVersion;
|
||||
return attachmentWithoutSchemaVersion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue