From d348c64f857e176f5e30d202feb8547e5afd5c4d Mon Sep 17 00:00:00 2001 From: alex-e-leon Date: Mon, 7 Nov 2016 19:31:26 +1100 Subject: [PATCH] Fixed componentWillReceiveProps options function bug (#273) Fixes a bug which prevented you from changing the function passed to the options prop --- src/google_map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google_map.js b/src/google_map.js index a49f2c4..0f22ace 100644 --- a/src/google_map.js +++ b/src/google_map.js @@ -282,7 +282,7 @@ export default class GoogleMap extends Component { ? nextProps.options(mapPlainObjects) : nextProps.options; // remove zoom, center and draggable options as these are managed by google-maps-react - options = omit(nextProps.options, ['zoom', 'center', 'draggable']); + options = omit(options, ['zoom', 'center', 'draggable']); if (options.hasOwnProperty('minZoom')) { const minZoom = this._computeMinZoom(options.minZoomOverride, options.minZoom);