From 61295d060042edf581b88b47b7199e43be0639a8 Mon Sep 17 00:00:00 2001 From: Nick Krecklow Date: Sun, 19 Apr 2020 20:04:13 -0500 Subject: [PATCH] Safely handle legacy recordData that may not include the timestamp payload --- assets/js/servers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/servers.js b/assets/js/servers.js index 35f8dca..6d16369 100644 --- a/assets/js/servers.js +++ b/assets/js/servers.js @@ -221,7 +221,7 @@ export class ServerRegistration { const recordData = ping.recordData // Safely handle legacy recordData that may not include the timestamp payload - if (recordData.timestamp !== -1) { + if (recordData.timestamp > 0) { recordValueElement.innerHTML = formatNumber(recordData.playerCount) + ' (' + formatDate(recordData.timestamp) + ')' recordLabelElement.title = 'At ' + formatDate(recordData.timestamp) + ' ' + formatTimestamp(recordData.timestamp) } else {