mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-22 13:53:48 +01:00
fix error
This commit is contained in:
parent
5a11fafb0c
commit
01691bc609
@ -6,7 +6,7 @@ export function sleep(time) {
|
|||||||
|
|
||||||
export function parseFetch(response) {
|
export function parseFetch(response) {
|
||||||
return response.json().then(({ status, data, msg }) => {
|
return response.json().then(({ status, data, msg }) => {
|
||||||
if (!status === 'success') throw new Error(msg);
|
if (status !== 'success') throw new Error(msg);
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user