From 24de07c37a3e2515c3688da81de7b1de990f9c02 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Thu, 30 May 2024 18:04:52 -0700 Subject: [PATCH] Guard against nil --- app/services/hyrax/indexes_thumbnails_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/hyrax/indexes_thumbnails_decorator.rb b/app/services/hyrax/indexes_thumbnails_decorator.rb index d63983048..8a0be6306 100644 --- a/app/services/hyrax/indexes_thumbnails_decorator.rb +++ b/app/services/hyrax/indexes_thumbnails_decorator.rb @@ -10,7 +10,7 @@ def thumbnail_path if object.try(:collection?) && UploadedCollectionThumbnailPathService.uploaded_thumbnail?(object) UploadedCollectionThumbnailPathService.call(object) else - CollectionResourceIndexer.thumbnail_path_service.call(object).gsub('/app/samvera', '') + CollectionResourceIndexer.thumbnail_path_service.call(object)&.gsub('/app/samvera', '') end end end