Skip to content

Commit

Permalink
#152 - Revert skipping any non-GET requests in service worker. Instea…
Browse files Browse the repository at this point in the history
…d showing loader circle on 0% upload progress.

Revert "#141 - Immediately return from service-worker fetch when request is not GET."

This reverts commit 2e110c8.
  • Loading branch information
maraf committed Oct 5, 2020
1 parent bbf4ddb commit 497d6a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public string StatusCssClass
if (Progress.Status == "done")
return "text-success";
else if (Progress.Status == "current")
return "text-primary";
return Progress.Percentual == 0 ? "loading-circle" : $"text-primary";
else if (Progress.Status == "error")
return "text-danger";
else if (Progress.Status == "pending")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ async function onActivate(event) {

async function onFetch(event) {
let cachedResponse = null;
if (event.request.method !== 'GET') {
return;
} else {
if (event.request.method === 'GET') {
// For all navigation requests, try to serve index.html from cache
// If you need some URLs to be server-rendered, edit the following check to exclude those URLs
const shouldServeIndexHtml = event.request.mode === 'navigate';
Expand Down

0 comments on commit 497d6a8

Please sign in to comment.