From d99722be5ce09ca75b308068e76eae6efcda4ad4 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 8 Mar 2021 12:20:10 +0100 Subject: [PATCH] Fix new step creation --- app/helpers/file_icons_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/file_icons_helper.rb b/app/helpers/file_icons_helper.rb index fd066a7bd..aa64d49e8 100644 --- a/app/helpers/file_icons_helper.rb +++ b/app/helpers/file_icons_helper.rb @@ -2,13 +2,13 @@ module FileIconsHelper def wopi_file?(asset) - file_ext = asset.file_name.split('.').last.downcase + file_ext = asset.file_name.split('.').last&.downcase %w(csv ods xls xlsb xlsm xlsx odp pot potm potx pps ppsm ppsx ppt pptm pptx doc docm docx dot dotm dotx odt rtf).include?(file_ext) end def file_fa_icon_class(asset) - file_ext = asset.file_name.split('.').last.downcase + file_ext = asset.file_name.split('.').last&.downcase if Extends::FILE_FA_ICON_MAPPINGS[file_ext] # Check for custom mappings or possible overrides Extends::FILE_FA_ICON_MAPPINGS[file_ext] @@ -31,7 +31,7 @@ module FileIconsHelper # For showing next to file def file_extension_icon(asset, report = false) - file_ext = asset.file_name.split('.').last.downcase + file_ext = asset.file_name.split('.').last&.downcase if Constants::FILE_TEXT_FORMATS.include?(file_ext) image_link = 'icon_small/docx_file.svg' elsif Constants::FILE_TABLE_FORMATS.include?(file_ext)