Skip to content

Commit

Permalink
fix: use Array.from when converting Set (#5428)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblafeve authored Jul 31, 2024
1 parent 7d6c939 commit 0ec0af6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-singers-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---

fix(core): findDuplicates - use Array.from when converting Set
2 changes: 1 addition & 1 deletion packages/core/src/utilities/findDuplicates.ts
Original file line number Diff line number Diff line change
@@ -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))
}

0 comments on commit 0ec0af6

Please sign in to comment.