Skip to content

Commit 261a0b5

Browse files
committed
fix: attachments draft middleware
1 parent e6774d0 commit 261a0b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

package/src/middlewares/attachments.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ export const createDraftAttachmentsCompositionMiddleware = (
8383
const { attachmentManager } = composer;
8484
if (!attachmentManager) return forward();
8585

86-
const successfulUploads = attachmentManager.successfulUploads;
87-
const attachments = successfulUploads.length
88-
? (state.draft.attachments ?? []).concat(successfulUploads.map(localAttachmentToAttachment))
89-
: undefined;
86+
const attachments = (state.draft.attachments ?? []).concat(
87+
attachmentManager.attachments.map(localAttachmentToAttachment),
88+
);
9089

9190
return next({
9291
...state,

0 commit comments

Comments
 (0)