1
0
Fork 0
mirror of synced 2024-07-02 21:10:43 +12:00

Respond to PR feedback.

This commit is contained in:
Sam Rose 2023-12-14 11:08:55 +00:00
parent 598ab03fd0
commit 0597c0efc6
No known key found for this signature in database

View file

@ -100,14 +100,14 @@ export async function getLinkDocuments(args: {
export function getUniqueByProp(array: any[], prop: string) {
const seen = new Set()
const ret = []
const filteredArray = []
for (const item of array) {
if (!seen.has(item[prop])) {
seen.add(item[prop])
ret.push(item)
filteredArray.push(item)
}
}
return ret
return filteredArray
}
export function getLinkedTableIDs(table: Table): string[] {