diff --git a/javascript/components/annotations/Annotation.tsx b/javascript/components/annotations/Annotation.tsx index 448e8d798..68057e56a 100644 --- a/javascript/components/annotations/Annotation.tsx +++ b/javascript/components/annotations/Annotation.tsx @@ -127,7 +127,10 @@ const Annotation = React.forwardRef( const children = []; const symbolStyle: SymbolLayerStyleProps | undefined = props.icon - ? { ...props.style, iconImage: props.icon } + ? { + ...props.style, + iconImage: typeof props.icon === "string" ? props.icon : undefined, + } : undefined; if (symbolStyle) {