Unverified Commit d600d8c3 authored by Peter Bengtsson's avatar Peter Bengtsson
Browse files

same before config.onUpdate

parent 32c42858
1 merge request!5301avoid TypeError on when registering service workers without config
This commit is part of merge request !5301. Comments created here will be created in the context of that merge request.
Showing with 1 addition and 1 deletion
+1 -1
......@@ -68,7 +68,7 @@ function registerValidSW(swUrl, config) {
console.log('New content is available; please refresh.');
// Execute callback
if (config.onUpdate) {
if (config && config.onUpdate) {
config.onUpdate(registration);
}
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment