Fix comment

This commit is contained in:
Alex Gleason 2022-03-16 21:58:30 -05:00
parent f1a286f5e0
commit b0623597ea
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -29,6 +29,7 @@ export const AttachmentRecord = ImmutableRecord({
status: null, status: null,
}); });
// Ensure attachments have required fields
const normalizeUrls = (attachment: ImmutableMap<string, any>) => { const normalizeUrls = (attachment: ImmutableMap<string, any>) => {
const url = [ const url = [
attachment.get('url'), attachment.get('url'),
@ -44,7 +45,6 @@ const normalizeUrls = (attachment: ImmutableMap<string, any>) => {
return attachment.mergeWith(mergeDefined, base); return attachment.mergeWith(mergeDefined, base);
}; };
// Ensure attachments have required fields
export const normalizeAttachment = (attachment: Record<string, any>) => { export const normalizeAttachment = (attachment: Record<string, any>) => {
return AttachmentRecord( return AttachmentRecord(
normalizeUrls(ImmutableMap(fromJS(attachment))), normalizeUrls(ImmutableMap(fromJS(attachment))),