Skip to content

Commit 75613cb

Browse files
Fix options not updated bug (google-map-react#878)
Co-authored-by: Michael Diego <6419886+itsmichaeldiego@users.noreply.github.com>
1 parent 381515c commit 75613cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/google_map.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,14 @@ export default class GoogleMap extends Component {
406406
}))
407407
);
408408
}
409+
if (
410+
this.heatmap &&
411+
!shallowEqual(nextProps.heatmap.options, this.props.heatmap.options)
412+
) {
413+
Object.keys(nextProps.heatmap.options).forEach((option) => {
414+
this.heatmap.set(option, nextProps.heatmap.options[option]);
415+
});
416+
}
409417
}
410418
}
411419

0 commit comments

Comments
 (0)