Skip to content

Commit e848a67

Browse files
committed
nit:PR feedback for more concise fn
1 parent 743c936 commit e848a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SpatialFeaturesLayer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ const SpatialFeaturesLayer = ({ onFeatureClick }) => {
369369
}, [map, polygonLayerFilter]);
370370

371371
useEffect(() => {
372-
if (!!map && !map.hasImage('marker-icon')) {
372+
if (!map?.hasImage?.('marker-icon')) {
373373
addMapImage({ src: MarkerImage, id: 'marker-icon' });
374374
}
375375
if (!!map && !map.hasImage('ranger-stations')) {

0 commit comments

Comments
 (0)