From ddd1655a39f4e5b64b3a9f3ba5f8179c964a81ed Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 31 May 2024 13:10:04 -0700 Subject: [PATCH] Update indexes_thumbnails_decorator.rb --- app/services/hyrax/indexes_thumbnails_decorator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/hyrax/indexes_thumbnails_decorator.rb b/app/services/hyrax/indexes_thumbnails_decorator.rb index d90e9cca9..25225bb12 100644 --- a/app/services/hyrax/indexes_thumbnails_decorator.rb +++ b/app/services/hyrax/indexes_thumbnails_decorator.rb @@ -10,10 +10,10 @@ def thumbnail_path file_path = CollectionResourceIndexer.thumbnail_path_service.call(object) if object.try(:collection?) && UploadedCollectionThumbnailPathService.uploaded_thumbnail?(object) UploadedCollectionThumbnailPathService.call(object) - elsif file_path.include?('/branding') + elsif file_path&.include?('/branding') file_path.gsub(/.*?(\/branding)/, '\1') else - super + file_path end end end