소스 검색

#4480 Install updated service worker immediately

Alex Trofimov 3 년 전
부모
커밋
4e7dc52319
1개의 변경된 파일과 1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      sw.js.php

+ 1 - 0
sw.js.php

@@ -70,6 +70,7 @@ let coreAssets = <?php echo json_encode($aAssets); ?>;
 
 // On install, cache core assets
 self.addEventListener('install', function (event) {
+    self.skipWaiting();
     // Cache core assets
     event.waitUntil((async () => { 
         caches.open('<?php echo $sCacheName; ?>').then(function (cache) {