do something a bit silly
This commit is contained in:
parent
7be5fe4242
commit
dd86e807ca
@ -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
|
||||||
|
@ -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),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user