From 728570a210ee463e8fbe8e96ced03852200a4056 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:45:57 +0200 Subject: [PATCH] Update src/rest/run_method.ts Co-authored-by: ayntee --- src/rest/run_method.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/run_method.ts b/src/rest/run_method.ts index 8787762b2..4acf928e5 100644 --- a/src/rest/run_method.ts +++ b/src/rest/run_method.ts @@ -33,7 +33,7 @@ export function runMethod( method: method.toUpperCase(), }) .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; })