Almost there
This commit is contained in:
2
webapp/dist/main.js
vendored
2
webapp/dist/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -93,7 +93,7 @@ class ClimateChart {
|
||||
const url = "/" + this.rootUrl + "data?since=" + currentTime;
|
||||
try {
|
||||
const payload: SnapshotRecords = await (await fetch(url)).json();
|
||||
if (payload.snapshots.length > 0) {
|
||||
if (payload.snapshots.length > 0 && new Date(payload.snapshots[0].time).getTime() > Date.now()) {
|
||||
this.latestSnapshot = payload.snapshots[0];
|
||||
this.removeExpiredData(currentTime);
|
||||
this.insertSnapshots(...payload.snapshots);
|
||||
|
||||
Reference in New Issue
Block a user