diff --git a/lib/client/vanilla/editor.tsx b/lib/client/vanilla/editor.tsx index 2d25ee44..7bb605b4 100644 --- a/lib/client/vanilla/editor.tsx +++ b/lib/client/vanilla/editor.tsx @@ -57,7 +57,7 @@ const getImageUrl = (standaloneServer: boolean, imageSrc: string) => { } const isEventOnElement = (element: HTMLElement, event: React.MouseEvent) => { - if (!element) return + if (!element) return false const rect = element.getBoundingClientRect() const isX = rect.top < event.clientY && rect.bottom > event.clientY const isY = rect.left < event.clientX && rect.right > event.clientX @@ -65,7 +65,7 @@ const isEventOnElement = (element: HTMLElement, event: React.MouseEvent) => { - if (!element) return + if (!element) return false const rect = element.getBoundingClientRect() return rect.top + (rect.bottom - rect.top) / 2 > event.clientY }