Commit 936c6627 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 0751d2dd
...@@ -168,7 +168,16 @@ ...@@ -168,7 +168,16 @@
caches.open(CACHE_NAME) caches.open(CACHE_NAME)
.then(function (cache) { .then(function (cache) {
// Add all offline dependencies to the 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 () { .then(function () {
// At this point everything has been cached // At this point everything has been cached
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>974.39717.56905.47274</string> </value> <value> <string>976.10820.28958.15769</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1553593581.07</float> <float>1559652532.29</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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