From b9a667a61da0d1bfd18900f958a590f1c67c5921 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Wed, 22 Mar 2023 15:18:02 +0800 Subject: [PATCH] chore --- src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index abc7499..bbd1253 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -81,6 +81,9 @@ const App = () => { const deleteCookie = async () => { const currentCookie = await getCookie(); + if (currentCookie.length === 0) { + return; + } return new Promise((resolve, reject) => { currentCookie.forEach((cookieRecord) => { GM_cookie('delete', { name: cookieRecord.name }, (cookie, error) => {