Commit 32c42858 authored by Peter Bengtsson's avatar Peter Bengtsson
Browse files

avoid TypeError on when registering service workers without config

Fixes #5299
parent 3a4414c1
1 merge request!5301avoid TypeError on when registering service workers without config
Showing with 1 addition and 1 deletion
+1 -1
......@@ -78,7 +78,7 @@ function registerValidSW(swUrl, config) {
console.log('Content is cached for offline use.');
// Execute callback
if (config.onSuccess) {
if (config && config.onSuccess) {
config.onSuccess(registration);
}
}
......
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