Removed componentWillUpdate

This commit is contained in:
orangemug committed 2018-08-06 22:27:03 +01:00
1 parent c5ea9494df
commit 1aa90bef37
7 files changed
+52 -48

No files matched your search

+2 -2
View File
@@ -29,10 +29,10 @@ class OpenLayers3Map extends React.Component {
const styleFunc = olms.apply(this.map, newMapStyle)
}
UNSAFE_componentWillReceiveProps(nextProps) {
componentDidUpdate() {
require.ensure(["ol", "ol-mapbox-style"], () => {
if(!this.map) return
this.updateStyle(nextProps.mapStyle)
this.updateStyle(this.props.mapStyle)
})
}