fix 500 if user has no threads because they've never commented

This commit is contained in:
Peter Bhat Harkins 2023-08-29 08:09:14 -05:00
parent 73f4c0cab6
commit 07bfde6634
1 changed files with 1 additions and 0 deletions

View File

@ -556,6 +556,7 @@ class Comment < ApplicationRecord
.order('id desc')
.limit(20)
.pluck(:thread_id)
return Comment.none if thread_ids.empty?
Comment
.joins(<<~SQL