Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Dec 5, 2024
1 parent 7cd7c31 commit afefed0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/exports/elements/tip-tap-editor-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ export class TipTapEditorBase extends BaseElement {
this.__addPendingAttachment = this.__addPendingAttachment.bind(this);
this.__removePendingAttachment = this.__removePendingAttachment.bind(this);


this.registerDependencies();
this.addEventListener(AddAttachmentEvent.eventName, this.handleAttachment);

Expand Down Expand Up @@ -426,13 +425,15 @@ export class TipTapEditorBase extends BaseElement {
this.pendingAttachments.push(e.attachmentUpload);
}


/**
* @private
*/
__removePendingAttachment(e: { attachment: AttachmentManager } | { attachmentUpload: AttachmentUpload }) {
__removePendingAttachment(
e:
| { attachment: AttachmentManager }
| { attachmentUpload: AttachmentUpload },
) {
const index = this.pendingAttachments.findIndex((attachment) => {

// This is what you get from an attachment upload finishing.
if ("attachmentUpload" in e) {
return attachment === e.attachmentUpload;
Expand All @@ -443,7 +444,7 @@ export class TipTapEditorBase extends BaseElement {
return attachment.attachment.attachmentId === e.attachment.attachmentId;
}

return false
return false;
});

if (index > -1) {
Expand Down

0 comments on commit afefed0

Please sign in to comment.