From f37111fe2b253506cdfd5f3a03fcc5a84b921836 Mon Sep 17 00:00:00 2001 From: terrtia Date: Thu, 28 Mar 2024 09:47:53 +0100 Subject: [PATCH] fix: [UI matches extractor] fix empty matches --- bin/lib/module_extractor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/lib/module_extractor.py b/bin/lib/module_extractor.py index 41aa78c9..f66ccb89 100755 --- a/bin/lib/module_extractor.py +++ b/bin/lib/module_extractor.py @@ -242,8 +242,9 @@ def extract(obj_type, subtype, obj_id, content=None): extracted = extracted + matches # SORT By Start Pos - extracted = sorted(extracted, key=itemgetter(0)) - extracted = merge_overlap(extracted) + if extracted: + extracted = sorted(extracted, key=itemgetter(0)) + extracted = merge_overlap(extracted) # Save In Cache if extracted: