fix: 修复从本地文件系统加载文件时,如果文件夹中又有文件夹,报异常的问题

This commit is contained in:
Xu Zhimeng 2025-02-20 17:10:51 +08:00
parent 417d900cd5
commit a1b4ef4f97

View File

@ -445,8 +445,10 @@ export default {
let result = await iter.next()
while (!result.done) {
const fileHandle = result.value
const file = await fileHandle.getFile()
fileList.push(file)
if (fileHandle.kind == 'file') {
const file = await fileHandle.getFile()
fileList.push(file)
}
result = await iter.next()
}
@ -504,8 +506,10 @@ export default {
let result = await iter.next()
while (!result.done) {
const fileHandle = result.value
const file = await fileHandle.getFile()
fileList.push(file)
if (fileHandle.kind == 'file') {
const file = await fileHandle.getFile()
fileList.push(file)
}
result = await iter.next()
}