diff --git a/Casks/o/omnissa-horizon-client.rb b/Casks/o/omnissa-horizon-client.rb index 7a79f2212d84..7a740d5be825 100644 --- a/Casks/o/omnissa-horizon-client.rb +++ b/Casks/o/omnissa-horizon-client.rb @@ -11,7 +11,9 @@ url "https://customerconnect.omnissa.com/channel/public/api/v1.0/products/getRelatedDLGList?locale=en_US&category=desktop_end_user_computing&product=omnissa_horizon_clients&version=8&dlgType=PRODUCT_BINARY" regex(%r{/([^/]+)/Omnissa[._-]Horizon[._-]Client[._-]v?(\d+(?:[.-]\d+)+)\.dmg}i) strategy :json do |json, regex| - mac_json_info = json["dlgEditionsLists"]&.select { |item| item["name"]&.match(/mac/i) }&.first + mac_json_info = json["dlgEditionsLists"]&.find { |item| item["name"]&.match(/mac/i) } + next if mac_json_info.blank? + api_item = mac_json_info["dlgList"]&.first next if api_item.blank?