From bb6b07536e504ba1e303a242b27bd87b378e0475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 25 Jun 2020 11:39:18 +0200 Subject: [PATCH] Fixing Jasmine 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 c1f9efe4..6d84df3c 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.location.protocol + '//' + process.env.API_URL || "http://api.workadventure.localhost"; +const API_URL = (window !== undefined ? window.location.protocol : 'http://') + '//' + (process.env.API_URL || "http://api.workadventure.localhost"); const RESOLUTION = 3; const ZOOM_LEVEL = 1/*3/4*/; const POSITION_DELAY = 200; // Wait 200ms between sending position events