summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-24 13:00:44 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-24 13:00:44 +0100
commit255aa6f214f1005b671acf9c64d2beb13e0a7861 (patch)
treeafcb15dbdd9d47d28b6a4449247c818e84d78abd /public
parent5dec24377dc62241146bb674358621fb1fe34802 (diff)
downloadserver-255aa6f214f1005b671acf9c64d2beb13e0a7861.tar.gz
Fix join bug with roles and spaces in them.
Diffstat (limited to 'public')
-rw-r--r--public/common/client.js4
1 files changed, 2 insertions, 2 deletions
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;