We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41cf380 commit 5e8d5aeCopy full SHA for 5e8d5ae
2 files changed
.changeset/ensure-sw-refresh.md
@@ -0,0 +1,5 @@
1
+---
2
+default: patch
3
4
+
5
+Ensure new updates always reload the page properly.
src/index.tsx
@@ -54,9 +54,8 @@ if ('serviceWorker' in navigator) {
54
if (window.confirm('A new version of the app is available. Refresh to update?')) {
55
if (registration.waiting) {
56
registration.waiting.postMessage({ type: 'SKIP_WAITING_AND_CLAIM' });
57
- } else {
58
- window.location.reload();
59
}
+ window.location.reload();
60
61
};
62
0 commit comments