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 0b52149 commit b756b01Copy full SHA for b756b01
client/src/swConfig.js
@@ -13,15 +13,11 @@ export default swConfig
13
* @param {*} registration
14
*/
15
function updater(registration) {
16
- if (registration && registration.waiting) {
17
- registration.waiting.addEventListener("statechange", event => {
18
- if (event.target.state === "activated") {
19
- alert('New version available! Ready to update?')
20
- window.location.reload(true)
21
- console.info('service worker updated')
22
- }
23
- })
24
- registration.waiting.postMessage({ type: "SKIP_WAITING" })
+ if (registration && registration.unregister) {
+ registration.unregister()
+ alert('New version available! Ready to update?')
+ window.location.reload(true)
+ console.info('service worker updated')
25
}
26
27
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments