From a9ffccc1ac1d956a37f4096821f56fa7da0101fb Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Mon, 2 Mar 2020 10:22:00 -0500 Subject: [PATCH] use safety operator when indexing comment tag list (#6407) --- app/models/comment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index be9f11906..78e730137 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -58,7 +58,7 @@ class Comment < ApplicationRecord custom_css end attribute :tag_list do - commentable.tag_list + commentable&.tag_list end attribute :root_path do root&.path