You've already forked tf2wikipricing
fix: price data update time serialization
price update time was not properly serialized as a number like the schema was, and led to dates being stored as empty objects. UI code also did not check if date was NaN, and rendered "invalid date" instead.
This commit is contained in:
@@ -250,7 +250,7 @@ async function inject() {
|
||||
}).reverse().forEach((element) => {
|
||||
priceInfoboxHeadingRow.insertAdjacentElement('afterend', element.row);
|
||||
})
|
||||
if(!updateTime) { updateTime = new Date() }
|
||||
if(!updateTime || !(updateTime instanceof Date) || isNaN(+updateTime)) updateTime = new Date()
|
||||
|
||||
// Footer row
|
||||
const row = document.createElement("tr");
|
||||
|
||||
Reference in New Issue
Block a user