Skip to content

Commit be330a5

Browse files
committed
fix: getFileId uses pathname as id
1 parent d419dc3 commit be330a5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/client.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,11 @@ async function getDirectoryHandles(handle, name) {
244244

245245
async function getFileId(file) {
246246

247-
if (file.id = file.path || file.webkitRelativePath) {
247+
if (file.id = file.pathname) {
248248
return file.id;
249249
} else {
250-
const { name, size, type, lastModified } = file;
251-
const key = `${name}${size}${type}${lastModified}`;
252-
253-
file.id = key
254-
return key;
250+
file.id = `${file.name}${file.size}${file.type}${file.lastModified}`;
251+
return file.id;
255252
}
256253
}
257254

0 commit comments

Comments
 (0)