fix getFile with err

This commit is contained in:
frostime 2023-05-22 21:33:58 +08:00
parent 94469c4d5e
commit aa19c76235

View file

@ -308,8 +308,12 @@ export async function getFile(path: string): Promise<any> {
path: path path: path
} }
let url = '/api/file/getFile'; let url = '/api/file/getFile';
let file = await fetchSyncPost(url, data); try {
return file; let file = await fetchSyncPost(url, data);
return file;
} catch (error_msg) {
return null;
}
} }
export async function putFile(path: string, isDir: boolean, file: any) { export async function putFile(path: string, isDir: boolean, file: any) {