react-clear-cache
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -11,3 +11,3 @@ import { useRef, useEffect, useState } from 'react'; | ||
var _d = useState(true), loading = _d[0], setLoading = _d[1]; | ||
var _e = useState(true), isLatestVersion = _e[0], setIsLatestVersion = _e[1]; | ||
var _e = useState(false), isLatestVersion = _e[0], setIsLatestVersion = _e[1]; | ||
var useAppVersionState = createPersistedState('appVersion'); | ||
@@ -18,2 +18,5 @@ var _f = useAppVersionState(''), appVersion = _f[0], setAppVersion = _f[1]; | ||
console.log('Clearing cache and hard reloading...'); | ||
if (!latestVersion) | ||
return; | ||
setAppVersion(latestVersion); | ||
if ('caches' in window) { | ||
@@ -20,0 +23,0 @@ // Service worker cache should be cleared with caches.delete() |
@@ -15,3 +15,3 @@ 'use strict'; | ||
var _d = React.useState(true), loading = _d[0], setLoading = _d[1]; | ||
var _e = React.useState(true), isLatestVersion = _e[0], setIsLatestVersion = _e[1]; | ||
var _e = React.useState(false), isLatestVersion = _e[0], setIsLatestVersion = _e[1]; | ||
var useAppVersionState = createPersistedState('appVersion'); | ||
@@ -22,2 +22,5 @@ var _f = useAppVersionState(''), appVersion = _f[0], setAppVersion = _f[1]; | ||
console.log('Clearing cache and hard reloading...'); | ||
if (!latestVersion) | ||
return; | ||
setAppVersion(latestVersion); | ||
if ('caches' in window) { | ||
@@ -24,0 +27,0 @@ // Service worker cache should be cleared with caches.delete() |
{ | ||
"name": "react-clear-cache", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "A component to manage application updates.", | ||
@@ -5,0 +5,0 @@ "author": "noahjohn9259", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29683
181