diff --git a/src/util.ts b/src/util.ts index 309a6817..0e5fcb0d 100644 --- a/src/util.ts +++ b/src/util.ts @@ -25,5 +25,5 @@ export function compact(a: (T | undefined)[]): T[] { } export function uniq(arr: T[]): T[] { - return arr.filter(a => arr.includes(a)) + return arr.filter((a, i) => arr.findIndex(b => b === a) === i) }