Skip to content

Commit 761d909

Browse files
committed
typecheck before filtering on universe
1 parent 7e69017 commit 761d909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def cache_linkable_content_for_each_content_type
196196

197197
# If we're scoped to a universe, also scope contributor content pulled to that
198198
# universe. If we're not, leave it as all contributor content.
199-
if @universe_scope
199+
if @universe_scope && pages_to_add.klass.respond_to?(:universe)
200200
pages_to_add = pages_to_add.where(universe: @universe_scope)
201201
end
202202

0 commit comments

Comments
 (0)