From 2e6a0a9cd22fc3538e37c9300458ba3331b5be2d Mon Sep 17 00:00:00 2001 From: Ahmed Mostafa Date: Thu, 9 Feb 2023 23:46:01 +0200 Subject: [PATCH] Chore: return `null` if no Annotation component found --- .../Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx b/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx index bc779114..f2d78e01 100644 --- a/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx +++ b/packages/react-filerobot-image-editor/src/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.jsx @@ -11,6 +11,7 @@ const MemoizedAnnotation = ({ selectionsIds, }) => { const AnnotationComponent = ANNOTATION_NAMES_TO_COMPONENT[annotation.name]; + if (!AnnotationComponent) return null; return (