From f025da716f5e8a50ad73317b6418fc056bca531b Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sun, 28 Jun 2020 16:51:56 +1000 Subject: [PATCH] Added availability check in map loading overlay --- src/components/map/MapLoadingOverlay.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/map/MapLoadingOverlay.js b/src/components/map/MapLoadingOverlay.js index 93d5fed..8374fc5 100644 --- a/src/components/map/MapLoadingOverlay.js +++ b/src/components/map/MapLoadingOverlay.js @@ -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);