diff --git a/CHANGELOG.md b/CHANGELOG.md index f522bcc2..5016666d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v2.6.3 (2020-03-13) + +Fixed regression in v2.6.2 handling `maxZoom` and `minZoom` options in `Map` component. + ## v2.6.2 (2020-03-12) - Fixed applying `maxZoom` and `minZoom` options to tile layers. diff --git a/package.json b/package.json index 133befe9..63e131b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-leaflet", - "version": "2.6.2", + "version": "2.6.3", "description": "React components for Leaflet maps", "main": "lib/index.js", "module": "es/index.js", @@ -93,7 +93,7 @@ "react": "^16.13.0", "react-dom": "^16.13.0", "rimraf": "^3.0.2", - "rollup": "^2.0.5", + "rollup": "^2.0.6", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-resolve": "^5.2.0", diff --git a/src/GridLayer.js b/src/GridLayer.js index e1de3c1f..2b474dd6 100644 --- a/src/GridLayer.js +++ b/src/GridLayer.js @@ -24,13 +24,17 @@ export default class GridLayer< } getOptions(props: Props): Props { - const options = super.getOptions(props) + const options = { ...super.getOptions(props) } const { map } = props.leaflet if (map != null) { + // $FlowFixMe: Object spread if (options.maxZoom == null && map.options.maxZoom != null) { + // $FlowFixMe: Object spread options.maxZoom = map.options.maxZoom } + // $FlowFixMe: Object spread if (options.minZoom == null && map.options.minZoom != null) { + // $FlowFixMe: Object spread options.minZoom = map.options.minZoom } } diff --git a/yarn.lock b/yarn.lock index 321bf3e7..2ec86131 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7661,10 +7661,10 @@ rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.0.5.tgz#55b8c0d62360a095e322ac7425b13ac5a97edcb4" - integrity sha512-bECGz+RYpw3NYCvLnABu3REUROYbnZsfQZA37ekm/KlgKt/fyxBNN4waBnlLwzx4r6jNBs56SbTn7PEgJjw3fQ== +rollup@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.0.6.tgz#865d6bb15a28cff3429ea1dc57236013661cb9de" + integrity sha512-P42IlI6a/bxh52ed8hEXXe44LcHfep2f26OZybMJPN1TTQftibvQEl3CWeOmJrzqGbFxOA000QXDWO9WJaOQpA== optionalDependencies: fsevents "~2.1.2"