Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit d5d2fe1

Browse files
committed
fix: chrome nows treat filelist as an object instead of an array
1 parent de33c62 commit d5d2fe1

File tree

1 file changed

+3
-2
lines changed
  • examples/transfer-files/public/js

1 file changed

+3
-2
lines changed

examples/transfer-files/public/js/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ function onDrop (event) {
136136
})
137137
}
138138

139-
files.map((file) => {
139+
for (let i = 0; i < files.length; i++) {
140+
const file = files[i]
140141
readFileContents(file)
141142
.then((buffer) => {
142143
return node.files.add([{
@@ -151,7 +152,7 @@ function onDrop (event) {
151152
.join('<br>')
152153
})
153154
.catch(onError)
154-
})
155+
}
155156
}
156157

157158
/*

0 commit comments

Comments
 (0)