From ec542002cd74ff858d1df65a177164c08b29d42f Mon Sep 17 00:00:00 2001 From: Henk Date: Wed, 29 Jul 2026 06:32:06 +0200 Subject: [PATCH] chore: fix version URL and refactor PMV initialization --- lib/channel.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/channel.rb b/lib/channel.rb index c2baac5..b0f5ae6 100644 --- a/lib/channel.rb +++ b/lib/channel.rb @@ -5,10 +5,9 @@ class Channel def initialize(channel, platform, pmv) @channel = channel @platform = platform - # If Apple hasn't released any recent Rapid Security Responses, # the relevant JSON will be empty. - @pmv = pmv[channel][platform].nil? ? Array.new : pmv[channel][platform] + @pmv = pmv[channel]&.[](platform) || [] end def highest_version(versions) @@ -113,7 +112,7 @@ def security_link(version) if version_link.nil? rapid_channel? ? rapid_index_url : security_index_url else - apple_support_url + version_link[:href] + version_link[:href] end end