Skip to content

Commit

Permalink
Load nil reasons from API correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Rylan12 committed Dec 4, 2023
1 parent 961e6e4 commit 8619ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/deprecate_disable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def message(formula_or_cask)
end

def to_reason_string_or_symbol(string, type:)
if (type == :formula && FORMULA_DEPRECATE_DISABLE_REASONS.key?(string.to_sym)) ||
(type == :cask && CASK_DEPRECATE_DISABLE_REASONS.key?(string.to_sym))
if (type == :formula && FORMULA_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym)) ||
(type == :cask && CASK_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym))
return string.to_sym
end

Expand Down

0 comments on commit 8619ed3

Please sign in to comment.