mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: flaky specs after topic view custom filters (#13019)
* FIX: flaky specs after topic view custom filters When ensuring TopicView class variables return to the original state it should use empty Hash instead of empty Array. That https://github.com/discourse/discourse/blob/master/lib/topic_view.rb#L60 * FIX: convert to string for topic view custom filter
This commit is contained in:
+1
-1
@@ -781,7 +781,7 @@ class TopicView
|
||||
@contains_gaps = true
|
||||
end
|
||||
|
||||
if @filter.present? && @filter != 'summary' && TopicView.custom_filters[@filter].present?
|
||||
if @filter.present? && @filter.to_s != 'summary' && TopicView.custom_filters[@filter].present?
|
||||
@filtered_posts = TopicView.custom_filters[@filter].call(@filtered_posts, self)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user