Remove null-conditional operator

This commit is contained in:
Maciej Ziarkowski 2020-01-02 12:23:12 +00:00
parent dbd6487b0b
commit beea6675cb

View File

@ -35,7 +35,7 @@ async function apiRequest(
body: data == undefined ? null : JSON.stringify(data), body: data == undefined ? null : JSON.stringify(data),
}); });
const reviver = options?.jsonReviver; const reviver = options == undefined ? undefined : options.jsonReviver;
if (reviver != undefined) { if (reviver != undefined) {
return JSON.parse(await res.text(), reviver); return JSON.parse(await res.text(), reviver);
} else { } else {