Safely handle legacy recordData that may not include the timestamp payload
This commit is contained in:
parent
203d8df844
commit
61295d0600
@ -221,7 +221,7 @@ export class ServerRegistration {
|
|||||||
const recordData = ping.recordData
|
const recordData = ping.recordData
|
||||||
|
|
||||||
// Safely handle legacy recordData that may not include the timestamp payload
|
// 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) + ')'
|
recordValueElement.innerHTML = formatNumber(recordData.playerCount) + ' (' + formatDate(recordData.timestamp) + ')'
|
||||||
recordLabelElement.title = 'At ' + formatDate(recordData.timestamp) + ' ' + formatTimestamp(recordData.timestamp)
|
recordLabelElement.title = 'At ' + formatDate(recordData.timestamp) + ' ' + formatTimestamp(recordData.timestamp)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user