From 8d074e63e1e2632722574abd83998fb25146b45c Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Mon, 6 Nov 2023 15:42:21 +0800 Subject: [PATCH] throw fetch error --- src/libs/fetch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/fetch.js b/src/libs/fetch.js index e22fe4d..9889009 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -55,6 +55,10 @@ export const fetchApi = async ({ input, init, transOpts, apiSetting }) => { [input, init] = await newTransReq(transOpts, apiSetting); } + if (!input) { + throw new Error("url is empty"); + } + if (isGm) { let info; if (window.KISS_GM) {