diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-20 16:08:18 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-20 16:08:46 -0700 |
commit | 29365a7bf12331ecee5f53eca83cf141a2e8d1f9 (patch) | |
tree | fef6768ee6a2d7a45a22e7ade9c9d5fde96f4705 /modern/src/map/core/preloadImages.js | |
parent | 503421e22059140daa6dafbb1e6b0f08918a7757 (diff) | |
download | trackermap-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.js | 2 |
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 () => { |