revert universal cookie 🍪

This commit is contained in:
Masen Furer 2025-01-30 15:36:06 -08:00
parent 442b2b4602
commit d2ab7775b9
No known key found for this signature in database
GPG Key ID: 2AE2BD5531FF94F4

View File

@ -112,9 +112,12 @@ export const getBackendURL = (url_str) => {
* @returns True if the backend is disabled, false otherwise.
*/
export const isBackendDisabled = () => {
const backendEnabled = cookies.get("backend-enabled");
return backendEnabled === "false";
const cookie = document.cookie
.split("; ")
.find((row) => row.startsWith("backend-enabled="));
return cookie !== undefined && cookie.split("=")[1] == "false";
};
/**
* Determine if any event in the event queue is stateful.
*