diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-24 13:00:44 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-24 13:00:44 +0100 |
commit | 255aa6f214f1005b671acf9c64d2beb13e0a7861 (patch) | |
tree | afcb15dbdd9d47d28b6a4449247c818e84d78abd /public | |
parent | 5dec24377dc62241146bb674358621fb1fe34802 (diff) | |
download | server-255aa6f214f1005b671acf9c64d2beb13e0a7861.tar.gz |
Fix join bug with roles and spaces in them.
Diffstat (limited to 'public')
-rw-r--r-- | public/common/client.js | 4 |
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; |