From 772a0d4ea5f246155caee7a95e8627a93f24433c Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Sun, 28 Mar 2021 13:27:31 +0900 Subject: [PATCH] fix: Fetch no having options --- utils/Fetch.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/Fetch.ts b/utils/Fetch.ts index 2e88eca..d96fe53 100644 --- a/utils/Fetch.ts +++ b/utils/Fetch.ts @@ -2,6 +2,7 @@ import { ResponseProps } from '@types' import { KoreanbotsEndPoints } from './Constants' const Fetch = async (endpoint: string, options?: RequestInit, rawEndpoint=false): Promise> => { + options = options ?? {} const url = (rawEndpoint ? '' : KoreanbotsEndPoints.baseAPI) + (endpoint.startsWith('/') ? endpoint : '/' + endpoint) const res = await fetch(url, {