From 9fdfd7aab667365e6614479505ef18fd5b5d7257 Mon Sep 17 00:00:00 2001 From: Hilton Meyer Date: Tue, 30 Jun 2020 12:13:53 +0300 Subject: [PATCH 1/2] Add check for weight data being returen for graph --- src/components/Home.vue | 2 ++ 1 file changed, 2 insertions(+) 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', From f1eebc10b2b5e0dc832993183e019d9392c4af55 Mon Sep 17 00:00:00 2001 From: Hilton Meyer Date: Tue, 30 Jun 2020 12:14:14 +0300 Subject: [PATCH 2/2] Add ability to submit for using enter key --- src/components/Weight.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 @@