aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIN COMMON Collective <collective@incommon.cc>2021-03-22 19:07:04 +0100
committerIN COMMON Collective <collective@incommon.cc>2021-03-22 19:07:04 +0100
commitf3bd198305ef63373e63be0f4e54963b0db3f0fe (patch)
treefa68b120a2da5f4a7f196057c151c63ab4eeb93b
parent9540ae3af21601af19402cb843c6e6a47de7dd4e (diff)
downloadincommon-map-f3bd198305ef63373e63be0f4e54963b0db3f0fe.tar.gz
[FIX] Handle the case where there is no map in the database
-rw-r--r--app/helpers/map_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/map_helper.rb b/app/helpers/map_helper.rb
index 3403801..8fadff8 100644
--- a/app/helpers/map_helper.rb
+++ b/app/helpers/map_helper.rb
@@ -4,6 +4,7 @@
module MapHelper
def map_container(map = Map.first)
+ return unless map # Fixes a case where there are no maps
raw tag.div(
tag.div(id: 'map',
data: {