We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 442b2b4 commit d2ab777Copy full SHA for d2ab777
reflex/.templates/web/utils/state.js
@@ -112,9 +112,12 @@ export const getBackendURL = (url_str) => {
112
* @returns True if the backend is disabled, false otherwise.
113
*/
114
export const isBackendDisabled = () => {
115
- const backendEnabled = cookies.get("backend-enabled");
116
- return backendEnabled === "false";
+ const cookie = document.cookie
+ .split("; ")
117
+ .find((row) => row.startsWith("backend-enabled="));
118
+ return cookie !== undefined && cookie.split("=")[1] == "false";
119
};
120
+
121
/**
122
* Determine if any event in the event queue is stateful.
123
*
0 commit comments