From c5f33aaf99ce3cd4037ccbf38e50b5ca4f40f875 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Mon, 4 Dec 2023 14:11:31 -0500 Subject: [PATCH] Load `nil` reasons from API correctly --- Library/Homebrew/deprecate_disable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/deprecate_disable.rb b/Library/Homebrew/deprecate_disable.rb index 8ade837dea..adc3801cfa 100644 --- a/Library/Homebrew/deprecate_disable.rb +++ b/Library/Homebrew/deprecate_disable.rb @@ -63,8 +63,8 @@ module DeprecateDisable 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