fix: fix addind a deleted value to index not working

This commit is contained in:
daniel
2024-12-24 10:15:41 +01:00
parent 70d0b94a62
commit 41c9e60615

View File

@@ -294,7 +294,10 @@ export class DataviewSuggester extends EditorSuggest<String> {
// adding value to index if not present in index // adding value to index if not present in index
for (const newCompositeValue of updateCompositeValues) { for (const newCompositeValue of updateCompositeValues) {
if (!this.suggestionsRefCount.has(newCompositeValue)) { if (
!this.suggestionsRefCount.has(newCompositeValue) ||
this.suggestionsRefCount.get(newCompositeValue) === 0
) {
// not seen in this or other files // not seen in this or other files
this.suggestionsList.push(newCompositeValue); this.suggestionsList.push(newCompositeValue);
this.suggestionsRefCount.set(newCompositeValue, 1); this.suggestionsRefCount.set(newCompositeValue, 1);