Failsafe for window.process_env (#2962)
This commit is contained in:
parent
1258115f65
commit
95af7e1b72
@ -105,8 +105,8 @@ function createTest (t: <T= string> (key: string, text: string, options: { ns: s
|
||||
// value: The actual hosted secure websocket endpoint
|
||||
export default function create (t: <T= string> (key: string, text: string, options: { ns: string }) => T): LinkOption[] {
|
||||
const ENV: LinkOption[] = [];
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
|
||||
const WS_URL = process.env.WS_URL || (window as any).process_env?.WS_URL as string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,camelcase
|
||||
const WS_URL = process?.env?.WS_URL || (window as any)?.process_env?.WS_URL as string;
|
||||
|
||||
if (WS_URL) {
|
||||
ENV.push({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user