Protect against missing element
This commit is contained in:
+2
-3
@@ -115,10 +115,9 @@ function App() {
|
|||||||
initPersistedState().then(() => {
|
initPersistedState().then(() => {
|
||||||
setReady(true)
|
setReady(true)
|
||||||
|
|
||||||
const preloadElement = document.getElementById('preload');
|
const preloadElement = document.getElementById('preload')
|
||||||
preloadElement.remove();
|
preloadElement?.remove()
|
||||||
})
|
})
|
||||||
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
|
|||||||
Reference in New Issue
Block a user