Skip to content

Commit

Permalink
fix branch
Browse files Browse the repository at this point in the history
  • Loading branch information
CoNETProject committed Sep 30, 2023
1 parent 364e108 commit 81c24f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../src/font/font.css'

const rootElement = document.getElementById('root')

if (rootElement) {
if (rootElement && 'serviceWorker' in navigator) {
const root = createRoot(rootElement)
root.render(

Expand All @@ -20,9 +20,7 @@ if (rootElement) {
</RootProvider>

)
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register("/sw.js")
}
navigator.serviceWorker.register("/sw.js")

} else {
console.log (`CoNET Platform Loader Error: can't find rootElement`)
Expand Down

0 comments on commit 81c24f8

Please sign in to comment.