From 01691bc609e8e0a67f49ba19d026b843583655d8 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 25 Jan 2018 17:29:58 +0100 Subject: [PATCH] fix error --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index d17775b..2849b28 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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; }); }