From a9bbc73e6efa0f3ef3168a9f39584880c7152690 Mon Sep 17 00:00:00 2001 From: kunduin <15852158126@163.com> Date: Mon, 17 Jun 2019 23:52:59 +0800 Subject: [PATCH] test(storybook): fix lint error --- stories/index.stories.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stories/index.stories.tsx b/stories/index.stories.tsx index 7dc8e08..3297447 100644 --- a/stories/index.stories.tsx +++ b/stories/index.stories.tsx @@ -25,9 +25,13 @@ storiesOf("Hello World", module) onProgress(done / total); } }); - xhr.addEventListener("readystatechange", e => { + xhr.addEventListener("readystatechange", () => { if (xhr.readyState === 4) { - onSuccess(xhr.response); + if (xhr.status === 200) { + onSuccess(xhr.response); + } else { + onError(); + } } });