From 2fdc2942938166d63d3155215c9820c0b1e23536 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 21 Mar 2024 16:25:49 +0200 Subject: [PATCH] fix annot --- lib/templates/build_annotations.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/templates/build_annotations.rb b/lib/templates/build_annotations.rb index 96510e2c..b654198b 100644 --- a/lib/templates/build_annotations.rb +++ b/lib/templates/build_annotations.rb @@ -9,6 +9,7 @@ module Templates pdf.pages.flat_map.with_index do |page, index| (page[:Annots] || []).filter_map do |annot| + next if annot.blank? next if annot[:A].blank? || annot[:A][:URI].blank? next unless annot[:Subtype] == :Link next if !annot[:A][:URI].starts_with?('https://') && !annot[:A][:URI].starts_with?('http://')