aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/core/preloadImages.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-20 16:08:18 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-20 16:08:46 -0700
commit29365a7bf12331ecee5f53eca83cf141a2e8d1f9 (patch)
treefef6768ee6a2d7a45a22e7ade9c9d5fde96f4705 /modern/src/map/core/preloadImages.js
parent503421e22059140daa6dafbb1e6b0f08918a7757 (diff)
downloadtrackermap-web-29365a7bf12331ecee5f53eca83cf141a2e8d1f9.tar.gz
trackermap-web-29365a7bf12331ecee5f53eca83cf141a2e8d1f9.tar.bz2
trackermap-web-29365a7bf12331ecee5f53eca83cf141a2e8d1f9.zip
Handle missing categories
Diffstat (limited to 'modern/src/map/core/preloadImages.js')
-rw-r--r--modern/src/map/core/preloadImages.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/modern/src/map/core/preloadImages.js b/modern/src/map/core/preloadImages.js
index 8649a347..770c1c57 100644
--- a/modern/src/map/core/preloadImages.js
+++ b/modern/src/map/core/preloadImages.js
@@ -49,6 +49,8 @@ export const mapIcons = {
van: vanSvg,
};
+export const mapIconKey = (category) => (mapIcons.hasOwnProperty(category) ? category : 'default');
+
export const mapImages = {};
export default async () => {