Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Dec 10, 2024
1 parent 223822b commit 1e9d16d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/core/hooks/use-editor-mention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: (
<Avatar
className="flex-shrink-0"
Expand Down

0 comments on commit 1e9d16d

Please sign in to comment.