Map bug fix

This commit is contained in:
Dennis Postma 2025-02-09 17:28:42 +01:00
parent d010159989
commit 49dcd92a9e

View File

@ -7,7 +7,8 @@ export function uuidv4() {
}
export function unduplicateArray(array: any[]) {
return [...new Set(array.flat())]
const arrayToProcess = typeof array.flat === 'function' ? array.flat() : array;
return [...new Set(arrayToProcess)]
}
export async function downloadCache<T extends { id: string; updatedAt: Date }>(endpoint: string, storage: BaseStorage<T>) {