ueberdosis/tiptap

"No value supplied for attribute class" error when passing undefined class to HTMLAttributes in Link

Open

#7,214 建立於 2025年11月12日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (23,454 star) (1,979 fork)batch import
area: coregood first issuejavascriptstatus: triage

描述

Affected Packages

extension-link

Version(s)

3.10.5

Bug Description

When you pass an undefined class to HTMLAttributes when configuring a link, it causes the following error: No value supplied for attribute class

eg.

Link.configure({
  HTMLAttributes: {
    class: undefined
  },
}),

Browser Used

Chrome

Code Example URL

https://codesandbox.io/p/sandbox/trusting-glitter-nyl9g3

Expected Behavior

Should throw an error but not crash when passing an undefined class

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.

貢獻者指南

"No value supplied for attribute class" error when passing undefined class to HTMLAttributes in Link · ueberdosis/tiptap#7214 | Good First Issue