From 63e2e176d309df14e6ad3b2904a5b2cd88ea4b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 25 Jun 2020 11:56:11 +0200 Subject: [PATCH] Fixing tests --- front/src/Enum/EnvironmentVariable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Enum/EnvironmentVariable.ts b/front/src/Enum/EnvironmentVariable.ts index ae51921b..e35818bc 100644 --- a/front/src/Enum/EnvironmentVariable.ts +++ b/front/src/Enum/EnvironmentVariable.ts @@ -1,5 +1,5 @@ const DEBUG_MODE: boolean = process.env.DEBUG_MODE == "true"; -const API_URL = (window !== undefined ? window.location.protocol : 'http://') + '//' + (process.env.API_URL || "api.workadventure.localhost"); +const API_URL = (typeof(window) !== 'undefined' ? window.location.protocol : 'http:') + '//' + (process.env.API_URL || "api.workadventure.localhost"); const RESOLUTION = 3; const ZOOM_LEVEL = 1/*3/4*/; const POSITION_DELAY = 200; // Wait 200ms between sending position events