diff --git a/lib/lookbook/entities/collections/preview_collection.rb b/lib/lookbook/entities/collections/preview_collection.rb index fd68aeacf..5fb774991 100644 --- a/lib/lookbook/entities/collections/preview_collection.rb +++ b/lib/lookbook/entities/collections/preview_collection.rb @@ -44,10 +44,7 @@ def remove_by_file_path(paths) end def entities - @_cache[:entities] ||= begin - all = collect_ordered_entities(to_tree(include_hidden: true)) - all.filter { _1.is_a?(Lookbook::PreviewEntity) } - end + @_cache[:entities] ||= collect_ordered_entities(to_tree(include_hidden: true)).grep(Lookbook::PreviewEntity) end class << self