diff --git a/src/CircleMarker.js b/src/CircleMarker.js index 62018291..4f0d3b8c 100644 --- a/src/CircleMarker.js +++ b/src/CircleMarker.js @@ -1,6 +1,6 @@ // @flow -import { CircleMarker as LeafletCircleMarker } from 'leaflet' +import { CircleMarker as LeafletCircleMarker, latLng } from 'leaflet' import { withLeaflet } from './context' import Path from './Path' @@ -20,7 +20,7 @@ class CircleMarker extends Path { } updateLeafletElement(fromProps: Props, toProps: Props) { - if (toProps.center !== fromProps.center) { + if (!latLng(toProps.center).equals(fromProps.center)) { this.leafletElement.setLatLng(toProps.center) } if (toProps.radius !== fromProps.radius) {