use safety operator when indexing comment tag list (#6407)

This commit is contained in:
Molly Struve 2020-03-02 10:22:00 -05:00 committed by GitHub
parent dee8d39fe7
commit a9ffccc1ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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