Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(mentions-menu): handle lazy memo returns undefined in mentions conroller (#1631)

Seamus397dc96cee51
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts
index 880f8b498b..97fea5bdb3 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts
@@ -89,7 +89,8 @@ export class MentionsMenuController {
combinedItems = createLazyMemo((): MentionItem[] => {
const buckets = this.buckets();
- if (!buckets) return [];
+ const currentBins = this.bins();
+ if (!buckets || !currentBins) return [];
const currentViewAllMode = this.viewAllMode();
const seenIds = new Set<string>(this.ignoredIds());
@@ -105,7 +106,6 @@ export class MentionsMenuController {
}
const result: MentionItem[] = [];
- const currentBins = this.bins();
buckets.forEach((config) => {
const limit = currentBins[config.id] || 0;