Skip to content

Commit

Permalink
fix(app): Avoid modifying the array when reading file URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Nov 25, 2024
1 parent 4a5bf01 commit dc6da53
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const downloadTree = async (
// Skip files which are already complete
if (fileHandle.size == file.size) continue
const writable = await fileHandle.createWritable()
const { body, status, statusText } = await fetch(file.urls.pop())
const { body, status, statusText } = await fetch(file.urls[0])

Check warning on line 85 in packages/openneuro-app/src/scripts/dataset/download/download-native.js

View check run for this annotation

Codecov / codecov/patch

packages/openneuro-app/src/scripts/dataset/download/download-native.js#L85

Added line #L85 was not covered by tests
let loaded = 0
const progress = new TransformStream({
transform(chunk, controller) {
Expand Down

0 comments on commit dc6da53

Please sign in to comment.