From b6322e7e78daa8782f0f06b468c0d619b2a0ee21 Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Wed, 16 Oct 2024 11:18:19 +0530 Subject: [PATCH] adding null fix --- ui/widgets/nuxeo-selectivity.js | 2 +- ui/widgets/nuxeo-tag-suggestion.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/widgets/nuxeo-selectivity.js b/ui/widgets/nuxeo-selectivity.js index 993309dc7..0a5eb6b4e 100644 --- a/ui/widgets/nuxeo-selectivity.js +++ b/ui/widgets/nuxeo-selectivity.js @@ -2438,7 +2438,7 @@ typedArrayTags[weakMapTag] = false; } else if ( value && Array.isArray(value) && - value.includes(options && options.term ? options.term.toLowerCase() : options.term) + value.includes(options && options.term ? options.term.toLowerCase() : null) ) { resultsHtml = this.selectivity.template('tagExists'); } else if (!resultsHtml && !options.add) { diff --git a/ui/widgets/nuxeo-tag-suggestion.js b/ui/widgets/nuxeo-tag-suggestion.js index 3b9444321..f3c4e8b1a 100644 --- a/ui/widgets/nuxeo-tag-suggestion.js +++ b/ui/widgets/nuxeo-tag-suggestion.js @@ -237,7 +237,7 @@ import { escapeHTML } from './nuxeo-selectivity.js'; } _newEntryFormatter(term) { - term = term ? term.toLowerCase() : term; + term = term ? term.toLowerCase() : null; return { id: term, displayLabel: term, newTag: true }; }