Fix web cache and service worker handoff
Build and deploy Flutter Web / build (push) Failing after 5m32s
Build and deploy Flutter Web / build (push) Failing after 5m32s
This commit is contained in:
@@ -38,8 +38,13 @@
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
var refreshing = false;
|
||||
var hadServiceWorkerController = !!navigator.serviceWorker.controller;
|
||||
|
||||
navigator.serviceWorker.addEventListener('controllerchange', function () {
|
||||
if (!hadServiceWorkerController) {
|
||||
hadServiceWorkerController = true;
|
||||
return;
|
||||
}
|
||||
if (refreshing) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user