Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: uniq commandIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 6, 2018
1 parent b145673 commit c31d9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export function compact<T>(a: (T | undefined)[]): T[] {
}

export function uniq<T>(arr: T[]): T[] {
return arr.filter(a => arr.includes(a))
return arr.filter((a, i) => arr.findIndex(b => b === a) === i)
}

0 comments on commit c31d9a7

Please sign in to comment.