From 701050c93b040d6959b7fffff926c3abbab0a2f7 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 17 Feb 2022 23:56:04 +0100 Subject: [PATCH] Simplify image detection --- UI/Popup/TagRenderingQuestion.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/UI/Popup/TagRenderingQuestion.ts b/UI/Popup/TagRenderingQuestion.ts index 39736a58d..db6271a1e 100644 --- a/UI/Popup/TagRenderingQuestion.ts +++ b/UI/Popup/TagRenderingQuestion.ts @@ -168,10 +168,9 @@ export default class TagRenderingQuestion extends Combine { const ff = TagRenderingQuestion.GenerateFreeform(state, configuration, applicableUnit, tagsSource, feedback); - const hasImages = applicableMappings.filter(mapping => mapping.then.ExtractImages().length > 0).length > 0 + const hasImages = applicableMappings.findIndex(mapping => mapping.then.icon !== undefined) >= 0 let inputEls: InputElement[]; - const ifNotsPresent = applicableMappings.some(mapping => mapping.ifnot !== undefined) function allIfNotsExcept(excludeIndex: number): TagsFilter[] {