From dc0795d138f9d1667abeed239ad077c3983785d0 Mon Sep 17 00:00:00 2001 From: octospacc Date: Tue, 13 Feb 2024 00:38:27 +0100 Subject: [PATCH] Fix WuppiMini app cookies --- src/WuppiMini/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WuppiMini/index.js b/src/WuppiMini/index.js index 5732c3e..5d043a2 100755 --- a/src/WuppiMini/index.js +++ b/src/WuppiMini/index.js @@ -209,7 +209,7 @@ const genCsrfToken = (accountString, time) => (isEnvServer && time && crypto.scr const matchCsrfToken = (bodyParams, accountString) => (isEnvServer ? bodyParams.formToken === genCsrfToken(accountString, bodyParams.formTime) : true); // try to use the built-in cookie API, fallback to a Storage-based wrapper in case it fails (for example on file:///) -const clientCookieApi = (isEnvBrowser && (document.cookie || (!document.cookie && (document.cookie = '_=_') && document.cookie) ? document.cookie : (set) => { +const clientCookieApi = (isEnvBrowser && (document.cookie || (!document.cookie && (document.cookie = '_=_') && document.cookie) ? (set) => (set ? (document.cookie = set) : document.cookie) : (set) => { if (set) { let api = sessionStorage; const tokens = set.split(';');