diff --git a/js/pacosako_io.js b/js/pacosako_io.js index 826dbf4..fa28a18 100644 --- a/js/pacosako_io.js +++ b/js/pacosako_io.js @@ -290,9 +290,9 @@ function startGamePoll(gameId, afterTime) { const thisRequest = game.currentRequest = $.ajax({ dataType: 'json', contentType: 'application/json', - url: `${API_BASE}/game/${gameId}${!afterTime ? '' : `/poll/${afterTime}`}`, + url: `${API_BASE}/game/${gameId}/poll/${afterTime || 0}`, cache: false, - timeout: afterTime ? LONG_TIMEOUT : SHORT_TIMEOUT, + timeout: LONG_TIMEOUT, }).done((data, textStatus, jqXHR) => { if (game.currentRequest === thisRequest) { game.currentRequest = null;