Skip to content

Commit abbbb3f

Browse files
Use simpler 'if-present' syntax instead of 'unless-nil' construct
Co-authored-by: Mike McQuaid <[email protected]>
1 parent 8cdd5c1 commit abbbb3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/cask/cask_loader.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def load(config:)
350350
end
351351
desc json_cask[:desc]
352352
homepage json_cask[:homepage]
353-
login_items json_cask[:login_items] unless json_cask[:login_items].nil?
353+
login_items json_cask[:login_items] if json_cask[:login_items].present?
354354

355355
if (deprecation_date = json_cask[:deprecation_date].presence)
356356
reason = DeprecateDisable.to_reason_string_or_symbol json_cask[:deprecation_reason], type: :cask

0 commit comments

Comments
 (0)