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

indexOf() === 0 could be startsWith #17

Closed
domenic opened this issue Mar 5, 2016 · 1 comment
Closed

indexOf() === 0 could be startsWith #17

domenic opened this issue Mar 5, 2016 · 1 comment

Comments

@domenic
Copy link

domenic commented Mar 5, 2016

if (e.request.url.indexOf(dataUrl) === 0)

could be

if (e.request.url.startsWith(dataUrl))

Every browser that supports service workers supports startsWith.

@petele
Copy link
Collaborator

petele commented Apr 19, 2019

Hi!

Thanks for the feedback. I've rewritten the codelab from scratch and believe I have fixed this issue. The code has been updated, and the new guide is now live.

If you find any issues with the new codelab, please let us know!

Thanks!

@petele petele closed this as completed Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants