Commit d9264c59 authored by Yusei Tahara's avatar Yusei Tahara Committed by Romain Courteaud

[erp5_web_renderjs_ui] Fix rjs_gadget_erp5_serviceworker.js. Use cache.add...

[erp5_web_renderjs_ui] Fix rjs_gadget_erp5_serviceworker.js. Use cache.add because safari does not support cache.addAll.
parent 18a6dc44
......@@ -168,7 +168,16 @@
caches.open(CACHE_NAME)
.then(function (cache) {
// Add all offline dependencies to the cache
return cache.addAll(REQUIRED_FILES);
return Promise.all(
REQUIRED_FILES
.map(function (url) {
/* Return a promise that's fulfilled
when each url is cached.
*/
// Use cache.add because safari does not support cache.addAll.
return cache.add(url);
})
)
})
.then(function () {
// At this point everything has been cached
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.39717.56905.47274</string> </value>
<value> <string>976.10820.28958.15769</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1553593581.07</float>
<float>1559652532.29</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
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