Skip to content

Commit fc560bb

Browse files
authored
Merge pull request #1616 from devtron-labs/fix-vite-exploration
fix: vite exploration issues
2 parents 4c628ff + 8f9d66d commit fc560bb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55
<meta charset="utf-8" />
6-
<link rel="preload" as="style" href='//fonts.googleapis.com/css?family=Open+Sans' type='text/css'>
6+
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
77
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" rel="stylesheet">
88
<link
99
href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap"

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,14 @@ export default function App() {
164164
}
165165

166166
useEffect(() => {
167+
if (window.isSecureContext && navigator.serviceWorker) {
167168
// check for sw updates on page change
168169
navigator.serviceWorker.getRegistrations().then((regs) => regs.forEach((reg) => reg.update()))
169170
if (!needRefresh) {
170171
return
171172
}
172173
update()
174+
}
173175
}, [location])
174176

175177
function onUpdate() {

0 commit comments

Comments
 (0)