From 9cd8963b6b16e507327bceefcdd5f0fbe6403c74 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 28 Aug 2024 14:57:27 -0400 Subject: [PATCH] Fix for no remote files --- app/factories/bulkrax/valkyrie_object_factory.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/factories/bulkrax/valkyrie_object_factory.rb b/app/factories/bulkrax/valkyrie_object_factory.rb index 1a3f90a5..6f3af3f8 100644 --- a/app/factories/bulkrax/valkyrie_object_factory.rb +++ b/app/factories/bulkrax/valkyrie_object_factory.rb @@ -266,8 +266,8 @@ def create_work(attrs) def combined_files_with(remote_files:) thumbnail_url = HashWithIndifferentAccess.new(self.attributes)['thumbnail_url'] - return [thumbnail_url] if remote_files.blank? - @combined_files ||= (thumbnail_url.present? ? remote_files + [thumbnail_url] : remote_files) + r = remote_files || [] + thumbnail_url.present? ? r + [thumbnail_url] : r end def file_set_params_for(uploaded_files, combined_files)