aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/Map.js')
-rw-r--r--modern/src/map/Map.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index 2bcf04f4..a718798d 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -37,8 +37,10 @@ const updateReadyValue = value => {
const initMap = async () => {
const background = await loadImage('images/background.svg');
await Promise.all(deviceCategories.map(async category => {
- const imageData = await loadIcon(category, background, `images/icon/${category}.svg`);
- if (!map.hasImage(category)) map.addImage(category, imageData, { pixelRatio: window.devicePixelRatio });
+ if (!map.hasImage(category)) {
+ const imageData = await loadIcon(category, background, `images/icon/${category}.svg`);
+ map.addImage(category, imageData, { pixelRatio: window.devicePixelRatio });
+ }
}));
updateReadyValue(true);
};