fix 500 if user has no threads because they've never commented
This commit is contained in:
parent
73f4c0cab6
commit
07bfde6634
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue