Skip to content

Commit

Permalink
fix: 查找 file id 失败
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingyya committed Aug 7, 2024
1 parent c0cf656 commit 72c0fba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/Parsed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const onWorkerMessage = async (m: WorkerResponse) => {
}
if (m.type === 'success') {
if (downloadType.value.code === 'jsonrpc') {
const file = selectedFiles.value.find(f => f.fs_id === m!!.body!!.filefsid);
const file = selectedFiles.value.find(f => String(f.fs_id) === String(m!!.body!!.filefsid));
if (file === undefined) {
message.warn(`${m!!.body!!.filename} 下载失败,请刷新页面后重试!`);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/deal-file-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function dealFileList(files: File[]) {
size: file.size,
icon: `pi ${dir ? 'pi-folder' : 'pi-file'}`,
fs_id: file.fs_id,
}
};
});
return {
tree,
Expand Down

0 comments on commit 72c0fba

Please sign in to comment.