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
1 changed files with 3 additions and 3 deletions

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[] {