From 255aa6f214f1005b671acf9c64d2beb13e0a7861 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 24 Nov 2021 13:00:44 +0100 Subject: Fix join bug with roles and spaces in them. --- public/common/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public') diff --git a/public/common/client.js b/public/common/client.js index ccc9718..dd3c6bf 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -9,8 +9,8 @@ if (!/\/[\w-]+\/play:\d+(:[\w-]+)?/.test(window.location.pathname)) { } const param_title_id = window.location.pathname.split("/")[1]; -const param_game_id = window.location.pathname.split("/")[2].split(":")[1] | 0; -const param_role = window.location.pathname.split("/")[2].split(":")[2] || "Observer"; +const param_game_id = decodeURIComponent(window.location.pathname.split("/")[2]).split(":")[1] | 0; +const param_role = decodeURIComponent(window.location.pathname.split("/")[2]).split(":")[2] || "Observer"; let game = null; let game_over = false; -- cgit v1.2.3