From cb2b11967a397a73e33ed813b84955e4aa7d95b6 Mon Sep 17 00:00:00 2001 From: Christopher Liu Date: Fri, 1 Nov 2019 16:42:08 -0500 Subject: [PATCH 1/2] Added a check in the patchShow function to check for internet, if there is no internet there will be an alert to notify the user. --- app/js/patchShow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/js/patchShow.js b/app/js/patchShow.js index 78f850c..f9e70d3 100644 --- a/app/js/patchShow.js +++ b/app/js/patchShow.js @@ -85,6 +85,9 @@ function getUrl() { // 4. Write the patch to patch.json // 5. Apply the patch to the entire show function patchShow() { + if (!navigator.onLine){ + window.alert("No internet connection") + } getPatch().then((path) => { patchButton.setAttribute('disabled', ''); label.innerText = 'Fetching Google Sheet...'; From 9319a08bfc7750c629cc15c069cf66fad1264480 Mon Sep 17 00:00:00 2001 From: Byron Ambright Date: Sun, 10 Nov 2019 14:50:31 -0600 Subject: [PATCH 2/2] Fix linter errors --- app/js/patchShow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/patchShow.js b/app/js/patchShow.js index f9e70d3..e8aa78f 100644 --- a/app/js/patchShow.js +++ b/app/js/patchShow.js @@ -85,8 +85,8 @@ function getUrl() { // 4. Write the patch to patch.json // 5. Apply the patch to the entire show function patchShow() { - if (!navigator.onLine){ - window.alert("No internet connection") + if (!navigator.onLine) { + window.alert('No internet connection'); } getPatch().then((path) => { patchButton.setAttribute('disabled', '');