fix: use Array.from when converting Set (#5428)

This commit is contained in:
Rob LaFeve 2024-07-31 17:00:26 -05:00 committed by GitHub
parent 7d6c9399c6
commit 0ec0af67b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
fix(core): findDuplicates - use Array.from when converting Set

View File

@ -1,5 +1,5 @@
export function findDuplicates(items: any[]): any[] {
const filtered = items.filter((el, index) => items.indexOf(el) !== index)
return [...new Set(filtered)]
return Array.from(new Set(filtered))
}