add default icon value if enterprise.category is nil

This commit is contained in:
Andy Brett
2021-02-23 11:37:36 -08:00
parent 9852470ef6
commit 2d304bd997
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ module Api
producer_shop: "map_003-producer-shop.svg",
producer: "map_001-producer-only.svg",
}
"/map_icons/" + icons[enterprise.category]
"/map_icons/" + (icons[enterprise.category] || "map_001-producer-only.svg")
end
# Choose regular icon font for enterprises.

View File

@@ -19,7 +19,7 @@ module Api
producer_shop: "map_003-producer-shop.svg",
producer: "map_001-producer-only.svg",
}
"/map_icons/" + icons[enterprise.category]
"/map_icons/" + (icons[enterprise.category] || "map_001-producer-only.svg")
end
def icon_font