diff --git a/public/javascripts/bingo-web.js b/public/javascripts/bingo-web.js index c891bc1..c9ee9f6 100644 --- a/public/javascripts/bingo-web.js +++ b/public/javascripts/bingo-web.js @@ -3,7 +3,11 @@ * @returns {string} */ function getGameParam() { - return window.location.href.match(/\?game=(\w+)/)[1]; + let matches = window.location.href.match(/\?game=(\w+)/); + if (matches) + return matches[1]; + else + return ''; } /**