Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss93 #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Iss93 #126

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this into the next block of code directly under the
label.innerText = 'Fetching Google Sheet...'; line because this is part of that whole process. That way, errors thrown here should be caught by the promise.

I would also include a return; at the end of this if statement because we don't want to try and execute a request over the Internet when we know there's no Internet go send a request over

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll probably need to delete your local branch and checkout to a branch of the same name because @ByronAmbright force pushed to this branch to resolve some lingering commit issues. Let us know if you need help figuring out how to do that.

window.alert('No internet connection');
}
getPatch().then((path) => {
patchButton.setAttribute('disabled', '');
label.innerText = 'Fetching Google Sheet...';
Expand Down