Skip to content

Commit f3eb0a4

Browse files
committed
Remove unused async-await
1 parent 0645159 commit f3eb0a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/network.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const customHeaders = ({ headers = {}, body }) => {
4343
const httpApiCall = async (url, { method = 'POST', headers = {}, body }) => {
4444
const custom = customHeaders({ headers, body });
4545
const options = { method, headers: custom, body };
46-
return await fetch(url, options).then(async (res) => {
46+
return await fetch(url, options).then((res) => {
4747
const code = res.status;
48-
if (code === 200) return await res.json();
48+
if (code === 200) return res.json();
4949
const dest = `for ${method} ${url}`;
5050
throw new Error(`HTTP status code ${code} ${dest}`);
5151
});

0 commit comments

Comments
 (0)