Skip to content

Commit

Permalink
Added a check in the patchShow function to check for internet, if the…
Browse files Browse the repository at this point in the history
…re is no internet there will be an alert to notify the user.
  • Loading branch information
chrliu719 authored and Byron Ambright committed Nov 10, 2019
1 parent 27ee096 commit cb2b119
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/js/patchShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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...';
Expand Down

0 comments on commit cb2b119

Please sign in to comment.