Added availability check in map loading overlay

This commit is contained in:
Mitchell McCaffrey 2020-06-28 16:51:56 +10:00
parent 22a577bcc7
commit f025da716f

View File

@ -18,7 +18,9 @@ function MapLoadingOverlay() {
return;
}
requestRef.current = requestAnimationFrame(animate);
progressBarRef.current.value = loadingProgressRef.current;
if (progressBarRef.current) {
progressBarRef.current.value = loadingProgressRef.current;
}
}
requestRef.current = requestAnimationFrame(animate);