fix(core): filter rendered extensionAttributes (#5588)

This commit is contained in:
yaokailun 2024-09-25 04:38:26 +08:00 committed by GitHub
parent 112d1495d6
commit d57ee51223
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
filter rendered extensionAttributes (#5588)

View File

@ -8,6 +8,9 @@ export function getRenderedAttributes(
extensionAttributes: ExtensionAttribute[],
): Record<string, any> {
return extensionAttributes
.filter(
attribute => attribute.type === nodeOrMark.type.name,
)
.filter(item => item.attribute.rendered)
.map(item => {
if (!item.attribute.renderHTML) {