lib/lookbook/entities/collections/preview_collection.rb in lookbook-2.0.5 vs lib/lookbook/entities/collections/preview_collection.rb in lookbook-2.1.0

- old
+ new

@@ -42,13 +42,10 @@ @entities.reject! { |preview| preview.file_path.to_s.in?(paths) } clear_cache 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 def preview_from_code_object(code_object) klass = code_object.path.constantize