From 104beed594d99c977d8a262af59e7b6db90395aa Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 3 Jan 2024 18:25:02 -0500 Subject: [PATCH] HTML Bugfix (#1238) --- lib/app_sources/html.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/app_sources/html.dart b/lib/app_sources/html.dart index 7ed84d6..2f01918 100644 --- a/lib/app_sources/html.dart +++ b/lib/app_sources/html.dart @@ -242,9 +242,14 @@ class HTML extends AppSource { Map additionalSettings, ) async { var currentUrl = standardUrl; - for (int i = 0; - i < (additionalSettings['intermediateLink']?.length ?? 0); - i++) { + if (additionalSettings['intermediateLink']?.isNotEmpty != true) { + additionalSettings['intermediateLink'] = []; + } + additionalSettings['intermediateLink'] = + additionalSettings['intermediateLink'] + .where((l) => l['customLinkFilterRegex'].isNotEmpty == true) + .toList(); + for (int i = 0; i < (additionalSettings['intermediateLink'].length); i++) { var intLinks = await grabLinksCommon(await sourceRequest(currentUrl), additionalSettings['intermediateLink'][i]); if (intLinks.isEmpty) {