Update src/rest/run_method.ts

Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
ITOH
2021-04-07 10:45:57 +02:00
committed by GitHub
parent 4b1597b2a7
commit 728570a210
+1 -1
View File
@@ -33,7 +33,7 @@ export function runMethod<T = any>(
method: method.toUpperCase(), method: method.toUpperCase(),
}) })
.then((res) => { .then((res) => {
if (res.status === 204) return undefined as unknown as T; if (res.status === 204) return undefined;
return res.json() as unknown as T; return res.json() as unknown as T;
}) })