From beea6675cb3557303b447c44bfa053656b7120ce Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Thu, 2 Jan 2020 12:23:12 +0000 Subject: [PATCH] Remove null-conditional operator --- app/src/frontend/apiHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/apiHelpers.ts b/app/src/frontend/apiHelpers.ts index 5be97cad..b35ecd7f 100644 --- a/app/src/frontend/apiHelpers.ts +++ b/app/src/frontend/apiHelpers.ts @@ -35,7 +35,7 @@ async function apiRequest( body: data == undefined ? null : JSON.stringify(data), }); - const reviver = options?.jsonReviver; + const reviver = options == undefined ? undefined : options.jsonReviver; if (reviver != undefined) { return JSON.parse(await res.text(), reviver); } else {