Prevent potential NPE
This commit is contained in:
parent
9d25aa4e43
commit
b3251a8de2
1 changed files with 1 additions and 1 deletions
|
@ -413,7 +413,7 @@
|
|||
}
|
||||
|
||||
const loadData = Attachment.loadData(migrationContext.readAttachmentData);
|
||||
const attachments = this.model.get('attachments');
|
||||
const attachments = this.model.get('attachments') || [];
|
||||
const loadedAttachmentViews = Promise.all(attachments.map(attachment =>
|
||||
new Promise(async (resolve) => {
|
||||
const attachmentWithData = await loadData(attachment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue