diff --git a/src/components/Home.vue b/src/components/Home.vue index 10d059b..e12574b 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -61,6 +61,8 @@ export default { const resp = await fetch(this.url); // Store the json values into the this.weightData = await resp.json(); + // Check if there is any data, if there isn't then exit the function + if (this.weightData.length === 0) return; this.pvOptions = { xaxis: { type: 'datetime', diff --git a/src/components/Weight.vue b/src/components/Weight.vue index 71adbf4..408ae48 100644 --- a/src/components/Weight.vue +++ b/src/components/Weight.vue @@ -1,6 +1,6 @@