Almost there
This commit is contained in:
@@ -45,7 +45,6 @@ class ClimateChart {
|
||||
}
|
||||
|
||||
private async getInitialDataBlob(): Promise<SnapshotRecords> {
|
||||
try {
|
||||
const data = await fetch(this.rootUrl + "/data?since=" + new Date((new Date().getTime() - this.minutesDisplayed * 60 * 1000)).toISOString());
|
||||
const payload = await data.json();
|
||||
if (payload.snapshots.length < 0) {
|
||||
@@ -53,10 +52,6 @@ class ClimateChart {
|
||||
}
|
||||
return payload;
|
||||
}
|
||||
catch (e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private async initChart() {
|
||||
const canvasElement = document.getElementById(this.canvasId);
|
||||
|
||||
Reference in New Issue
Block a user