do something a bit silly

This commit is contained in:
Khaleel Al-Adhami 2025-01-08 17:52:48 -08:00
parent 7be5fe4242
commit dd86e807ca
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import axios from "axios";
import io from "socket.io-client"; import io from "socket.io-client";
import JSON5 from "json5"; import JSON5 from "json5";
import env from "$/env.json"; import env from "$/env.json";
import reflexEnvironment from "$/reflex.json";
import Cookies from "universal-cookie"; import Cookies from "universal-cookie";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import Router, { useRouter } from "next/router"; import Router, { useRouter } from "next/router";
@ -407,7 +408,7 @@ export const connect = async (
socket.current = io(endpoint.href, { socket.current = io(endpoint.href, {
path: endpoint["pathname"], path: endpoint["pathname"],
transports: transports, transports: transports,
protocols: [env.REFLEX_VERSION], protocols: env.TEST_MODE ? undefined : [reflexEnvironment.version],
autoUnref: false, autoUnref: false,
}); });
// Ensure undefined fields in events are sent as null instead of removed // Ensure undefined fields in events are sent as null instead of removed

View File

@ -21,7 +21,7 @@ def set_env_json():
str(prerequisites.get_web_dir() / constants.Dirs.ENV_JSON), str(prerequisites.get_web_dir() / constants.Dirs.ENV_JSON),
{ {
**{endpoint.name: endpoint.get_url() for endpoint in constants.Endpoint}, **{endpoint.name: endpoint.get_url() for endpoint in constants.Endpoint},
"REFLEX_VERSION": constants.Reflex.VERSION, "TEST_MODE": os.environ.get("PYTEST_CURRENT_TEST", False),
}, },
) )