diff --git a/shared/editor/components/Image.tsx b/shared/editor/components/Image.tsx index 8a8a74c1e0..1834de6710 100644 --- a/shared/editor/components/Image.tsx +++ b/shared/editor/components/Image.tsx @@ -10,7 +10,6 @@ import { ComponentProps } from "../types"; import { ResizeLeft, ResizeRight } from "./ResizeHandle"; import useDragResize from "./hooks/useDragResize"; import { useTranslation } from "react-i18next"; -import some from "lodash/some"; import find from "lodash/find"; type Props = ComponentProps & { @@ -71,7 +70,6 @@ const Image = (props: Props) => { }, [node.attrs.width]); const sanitizedSrc = sanitizeUrl(src); - const hasLink = some(node.attrs.marks ?? [], (mark) => mark.type === "link"); const imgLink = find(node.attrs.marks ?? [], (mark) => mark.type === "link")?.attrs.href ?? ""; @@ -121,7 +119,7 @@ const Image = (props: Props) => { )} - {hasLink && !props.isEditable && ( + {imgLink && !props.isEditable && (