distinguish between 0 and undefined for afterTime when polling metadata
This commit is contained in:
parent
4f72d75642
commit
b553eb434a
|
|
@ -370,9 +370,9 @@ function startMetaPoll(afterTime) {
|
||||||
const thisRequest = meta.currentRequest = $.ajax({
|
const thisRequest = meta.currentRequest = $.ajax({
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
url: `${API_BASE}/games${!afterTime ? '' : `/poll/${afterTime}`}`,
|
url: `${API_BASE}/games${(afterTime === undefined) ? '' : `/poll/${afterTime}`}`,
|
||||||
cache: false,
|
cache: false,
|
||||||
timeout: afterTime ? LONG_TIMEOUT : SHORT_TIMEOUT,
|
timeout: (afterTime === undefined) ? SHORT_TIMEOUT : LONG_TIMEOUT,
|
||||||
}).done((data, textStatus, jqXHR) => {
|
}).done((data, textStatus, jqXHR) => {
|
||||||
if (meta.currentRequest === thisRequest) {
|
if (meta.currentRequest === thisRequest) {
|
||||||
meta.currentRequest = null;
|
meta.currentRequest = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue