From 1e9d16d12f05df718f1846138778dfe086d1eb85 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal Date: Tue, 10 Dec 2024 17:03:28 +0530 Subject: [PATCH] fix: build errors --- web/core/hooks/use-editor-mention.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/core/hooks/use-editor-mention.tsx b/web/core/hooks/use-editor-mention.tsx index 775ce9a0814..bf980328dc9 100644 --- a/web/core/hooks/use-editor-mention.tsx +++ b/web/core/hooks/use-editor-mention.tsx @@ -2,7 +2,7 @@ import { useCallback } from "react"; // plane editor import { TMentionSection, TMentionSuggestion } from "@plane/editor"; // plane types -import { TSearchEntities } from "@plane/types"; +import { TSearchEntities, TUserSearchResponse } from "@plane/types"; // plane ui import { Avatar } from "@plane/ui"; // helpers @@ -39,8 +39,9 @@ export const useEditorMention = (args: TArgs) => { } Object.keys(res).map((key) => { const responseKey = key as TSearchEntities; - if (responseKey === "user_mention" && res[responseKey] && res[responseKey].length > 0) { - const items: TMentionSuggestion[] = res[responseKey].map((user) => ({ + const response = res[responseKey]; + if (responseKey === "user_mention" && response && response.length > 0) { + const items: TMentionSuggestion[] = (response as TUserSearchResponse[]).map((user) => ({ icon: (