fix error

This commit is contained in:
casperlamboo 2018-01-25 17:29:58 +01:00
parent 5a11fafb0c
commit 01691bc609
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ export function sleep(time) {
export function parseFetch(response) {
return response.json().then(({ status, data, msg }) => {
if (!status === 'success') throw new Error(msg);
if (status !== 'success') throw new Error(msg);
return data;
});
}