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

TypeError: Cannot read property 'indexOf' of undefined #25154

Closed
truimagz opened this issue Jul 26, 2018 · 3 comments
Closed

TypeError: Cannot read property 'indexOf' of undefined #25154

truimagz opened this issue Jul 26, 2018 · 3 comments
Labels
area: service-worker Issues related to the @angular/service-worker package
Milestone

Comments

@truimagz
Copy link

I'm submitting a...


[X] Bug report  

Current behavior

TypeError: Cannot read property 'indexOf' of undefined

ngsw-worker.js:386

this.config.urls.indexOf(url)

Expected behavior

Should be able to bypass...

(this.config.urls || "").indexOf(url)

Minimal reproduction of the problem with instructions

Unable to fulfill "urls" attribute

What is the motivation / use case for changing the behavior?

To allow the worker to function without having "urls" attribute

Environment


Angular 5.1.0

Browser:
ALL
 
@SukhyAnand
Copy link

Can anybody review the code changes uploaded. Thanks.

@gkalpak
Copy link
Member

gkalpak commented Sep 17, 2018

AFAICT, config.urls can never be undefined, since this field is auto-generated. Having an asset group with no URLs is invalid anyway.

@gkalpak gkalpak closed this as completed Sep 17, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: service-worker Issues related to the @angular/service-worker package
Projects
None yet
Development

No branches or pull requests

4 participants