fix: error clicking "show details" after uploading by drag&drop

Massimo Melina committed Jan 3, 2025 at 11:36 UTC f745013b1541bbad762fb6b15941c7cd33c30053
1 file changed +2 -1
frontend/src/uploadQueue.ts
+2 -1
@@ -262,9 +262,10 @@ export async function enqueueUpload(entries: ToUpload[], to=location.pathname) {
262
263 entries = _.uniqBy(entries, x => getFilePath(x.file))
264 if (!entries.length) return
265 + entries = entries.map(x => ({ ...x, file: ref(x.file) })) // avoid valtio to mess with File object
266 const q = _.find(uploadState.qs, { to })
267 if (!q)
267 - return uploadState.qs.push({ to, entries: entries.map(ref) })
268 + return uploadState.qs.push({ to, entries })
269 const missing = _.differenceBy(entries, q.entries, x => getFilePath(x.file))
270 q.entries.push(...missing.map(ref))
271 }