Skip to content

Commit 1a51838

Browse files
committed
Remove unnecessary await; Other minor formatting
1 parent 3575b6a commit 1a51838

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function normalizeDomain(domain: string): string {
2525
}
2626

2727
export async function httpCall<JsonResponse>(url: string, init?: RequestInit): Promise<JsonResponse> {
28-
return await fetch(url, init).then(async (response) => {
28+
return fetch(url, init).then(async (response) => {
2929
if (response.status >= 200 && response.status <= 299) {
3030
return (await response.json()) as JsonResponse;
3131
}
@@ -34,7 +34,7 @@ export async function httpCall<JsonResponse>(url: string, init?: RequestInit): P
3434
return response;
3535
}).catch((error) => {
3636
throw new Error(error);
37-
})
37+
});
3838
}
3939

4040
export function addWindowEventListener(eventType: string, callback: any): () => void {

0 commit comments

Comments
 (0)