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

service-worker: await unnecessary, errors should be handled #254

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

Conversation

sidewayss
Copy link
Contributor

@sidewayss sidewayss commented Feb 3, 2024

Pretty simple stuff, minimal code changed. await as the last command in a function is pointless. Errors thrown during the completion of a promise should be handled. Low probability of errors in this project as-is, but high probability of errors for any newbie adapting this example for their own project.

The two calls to caches.match() could use similar .catch() blocks, but I left them alone for now. They're easy enough to add before merging if you all decide to include them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant