aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2024-02-23 22:46:57 -0500
committeralyssaf16 <alyssa_feinberg@brown.edu>2024-02-23 22:46:57 -0500
commit68e1cd008ed7e59b50f4c21884df3263c2922717 (patch)
tree996134f5663c707e0b4f52552d5735c5e40ec4a0
parent5eea93139bf95f761ef1511fd356c853346cc201 (diff)
change
-rw-r--r--src/client/views/nodes/DocumentView.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index e8b0fc4ba..ed5d31664 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -627,7 +627,7 @@ export class DocumentViewInternal extends DocComponent<FieldViewProps & Document
}
}
- !more && moreItems.length && cm.addItem({ description: 'More...', subitems: moreItems, icon: 'compass' });
+ !more && moreItems.length && cm.addItem({ description: 'More...', subitems: moreItems, icon: 'eye' });
}
const constantItems: ContextMenuProps[] = [];
if (!Doc.IsSystem(this.Document) && this.Document._type_collection !== CollectionViewType.Docking) {
@@ -1500,8 +1500,7 @@ ScriptingGlobals.add(function updateTagsCollection(collection: Doc) {
let created = false;
const matchedDocs = matchedTags
.filter(tagDoc => !Doc.AreProtosEqual(collection, tagDoc))
- .reduce((aset, tagDoc) => {
- if (Array.from(aset).find(doc => Doc.AreProtosEqual(tagDoc, doc))) return aset;
+ .map(tagDoc => {
let embedding = collectionDocs.find(doc => Doc.AreProtosEqual(tagDoc, doc));
if (!embedding) {
embedding = Doc.MakeEmbedding(tagDoc);
@@ -1511,10 +1510,9 @@ ScriptingGlobals.add(function updateTagsCollection(collection: Doc) {
wid += NumCast(tagDoc._width);
created = true;
}
- aset.add(embedding);
- return aset;
- }, new Set<Doc>());
+ return embedding;
+ });
- created && (collection[DocData].data = new List<Doc>(Array.from(matchedDocs)));
+ created && (collection[DocData].data = new List<Doc>(matchedDocs));
return true;
});