Fixed: empty uploading files

This commit is contained in:
Hsiaoyi 2023-07-31 17:42:31 +08:00 committed by GitHub
parent fc90e22a48
commit 36d46003d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,10 @@ export default class Gist {
}
async upload(files) {
if (Object.keys(files).length === 0) {
return Promise.reject('未提供需上传的文件');
}
const id = await this.locate();
if (id === -1) {