From 1acd831b13033aa6f4c674cdc1664c1c134f3ed4 Mon Sep 17 00:00:00 2001 From: marihachi Date: Sat, 15 May 2021 02:07:46 +0900 Subject: [PATCH] fix type error. 204 status response casts to any type. --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index 87f8629..ce5bfdd 100644 --- a/src/api.ts +++ b/src/api.ts @@ -22,7 +22,7 @@ export function request( if (res.status === 200) { resolve(body); } else if (res.status === 204) { - resolve(null); + resolve(null as any); } else { reject(body.error); } -- 2.43.0