Skip to content

Commit

Permalink
make pasteEvent optional
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch committed Oct 11, 2023
1 parent 0617b3d commit 03db31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-link/src/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const Link = Mark.create<LinkOptions>({
})),
type: this.type,
getAttributes: (match, pasteEvent) => {
const html = pasteEvent.clipboardData?.getData('text/html')
const html = pasteEvent?.clipboardData?.getData('text/html')
const hrefRegex = /href="([^"]*)"/

const existingLink = html?.match(hrefRegex)
Expand Down

0 comments on commit 03db31a

Please sign in to comment.