We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20162ed commit 4372925Copy full SHA for 4372925
src/_javascript/serviceworker/install.js
@@ -8,7 +8,13 @@ self.addEventListener( "install", function( event ){
8
event.waitUntil(
9
caches.open( sw_caches.static.name )
10
.then(function( cache ){
11
- return cache.addAll( preinstall );
+ return Promise.all(
12
+ preinstall.map(asset => {
13
+ return cache.add(asset).catch(err => {
14
+ console.error(`Failed to cache ${asset}:`, err);
15
+ });
16
+ })
17
+ );
18
})
19
);
20
0 commit comments