[fix] http 204 parse json

This commit is contained in:
CaffeinePower 2023-02-03 12:24:32 +09:00
parent c0ed039fc2
commit a0ae935ada
No known key found for this signature in database
GPG Key ID: 12B657CEA84ADF85

View File

@ -427,7 +427,14 @@ export default class 藍 {
body: JSON.stringify({
...{ i: config.i }, ...param
}),
}).then(res => res.json());
}).then(res => {
if(res.status != 204)
return res.json();
return new Promise((resolve, reject) => {
resolve(JSON.parse("{}"));
})
});
}
/**