From 54d392be822e11204225db0391643c7341847af9 Mon Sep 17 00:00:00 2001 From: jonny Date: Wed, 23 Jun 2021 15:06:38 +0200 Subject: [PATCH] fixed not returnin null if parsed from url --- front/package.json | 2 +- front/src/Connexion/Room.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/front/package.json b/front/package.json index 8652ba83..3204784f 100644 --- a/front/package.json +++ b/front/package.json @@ -58,7 +58,7 @@ "templater": "cross-env ./templater.sh", "serve": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" webpack serve --open", "build": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" NODE_ENV=production webpack", - "test": "TS_NODE_PROJECT=\"tsconfig-for-jasmine.json\" ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", + "test": "cross-env TS_NODE_PROJECT=\"tsconfig-for-jasmine.json\" ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "node_modules/.bin/eslint src/ . --ext .ts", "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts", "svelte-check-watch": "svelte-check --fail-on-warnings --fail-on-hints --compiler-warnings \"a11y-no-onchange:ignore,a11y-autofocus:ignore\" --watch", diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index e68108cb..434f9060 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -46,6 +46,9 @@ export class Room { roomId = roomId.substring(1); //remove the leading slash hash = absoluteExitSceneUrl.hash; hash = hash.substring(1); //remove the leading diese + if (!hash.length) { + hash = null + } } else { //absolute room Id const parts = identifier.split('#'); roomId = parts[0];