diff --git a/dist/react-leaflet-markercluster.js b/dist/react-leaflet-markercluster.js index 4553eca..3231c88 100644 --- a/dist/react-leaflet-markercluster.js +++ b/dist/react-leaflet-markercluster.js @@ -20,6 +20,10 @@ var _leaflet = require('leaflet'); var _leaflet2 = _interopRequireDefault(_leaflet); +var _deepEqual = require('deep-equal'); + +var _deepEqual2 = _interopRequireDefault(_deepEqual); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -42,7 +46,7 @@ function havingDeprecatedProps(markers) { // NOTE: Helpers function isArraysEqual(firstArray, secondArray) { - return JSON.stringify(firstArray) === JSON.stringify(secondArray); + return firstArray.length === secondArray.length && (0, _deepEqual2.default)(firstArray, secondArray); } function removeMarkersWithSameCoordinates(markers) { @@ -252,4 +256,4 @@ MarkerClusterGroup.propTypes = { MarkerClusterGroup.defaultProps = { markers: [] -}; +}; \ No newline at end of file diff --git a/dist/react-leaflet-markercluster.min.js b/dist/react-leaflet-markercluster.min.js index 562466a..5e1a1a5 100644 --- a/dist/react-leaflet-markercluster.min.js +++ b/dist/react-leaflet-markercluster.min.js @@ -1 +1 @@ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function havingDeprecatedProps(e){return-1!==e.findIndex(function(e){return e.lat||e.lng})}function isArraysEqual(e,r){return JSON.stringify(e)===JSON.stringify(r)}function removeMarkersWithSameCoordinates(e){var r=[e[0]];return e.forEach(function(e){JSON.stringify(r).includes(JSON.stringify(e))||r.push(e)}),r}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,r){for(var t=0;t