Fixed componentWillReceiveProps options function bug (#273)

Fixes a bug which prevented you from changing the function passed to
the options prop
This commit is contained in:
alex-e-leon 2016-11-07 19:31:26 +11:00 committed by Ivan Starkov
parent c4cfbd4f0f
commit d348c64f85

View File

@ -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);