From 4bd5be215404997bbd6b29043429979f77ae1edb Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 6 May 2017 14:27:23 -0700 Subject: [PATCH] try to fix fatal on notifications index when a topic is invalid --- app/views/notifications/index.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index e965f481..291da846 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -37,12 +37,12 @@ map = notification.notified_object.map %> added topic <%= topic.name %> to map <%= map.name %> <% when TOPIC_CONNECTED_1 %> - <% topic1 = notification.notified_object.topic1 - topic2 = notification.notified_object.topic2 %> + <% topic1 = notification.notified_object&.topic1 %> + <% topic2 = notification.notified_object&.topic2 %> connected <%= topic1.name %> to <%= topic2.name %> <% when TOPIC_CONNECTED_2 %> - <% topic1 = notification.notified_object.topic1 - topic2 = notification.notified_object.topic2 %> + <% topic1 = notification.notified_object&.topic1 %> + <% topic2 = notification.notified_object&.topic2 %> connected <%= topic2.name %> to <%= topic1.name %> <% when MESSAGE_FROM_DEVS %> <%= notification.subject %>