From a76b8153777d62995582d78fe9bf5a8453a92cb3 Mon Sep 17 00:00:00 2001 From: Scott Cytacki Date: Tue, 17 Sep 2024 11:50:58 -0400 Subject: [PATCH] fix issue with exemplar docs --- src/models/stores/sorted-documents.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/stores/sorted-documents.ts b/src/models/stores/sorted-documents.ts index 3fdb667d0..948c20608 100644 --- a/src/models/stores/sorted-documents.ts +++ b/src/models/stores/sorted-documents.ts @@ -259,6 +259,10 @@ export class SortedDocuments { get exemplarMetadataDocs() { const docsMap = MetadataDocMapModel.create(); + // We are just using this map for consistency with the other maps + // We don't need the benefits of MST's actions + unprotect(docsMap); + // OPTIMIZE: this isn't efficient. Every time a new document is added to stores.documents // this exemplarDocuments will be recomputed even though its value will not have changed. // So then all of these exemplar docs will get recreated.