Skip to content

Commit e9ed46d

Browse files
authored
Merge pull request #236 from madaz/master
check for bounds null on componentDidUpdate #235
2 parents 71d19a5 + aa79d72 commit e9ed46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class Map extends React.Component {
109109
if (prevState.currentLocation !== this.state.currentLocation) {
110110
this.recenterMap();
111111
}
112-
if (this.props.bounds !== prevProps.bounds) {
112+
if (this.props.bounds && this.props.bounds !== prevProps.bounds) {
113113
this.map.fitBounds(this.props.bounds);
114114
}
115115
}

0 commit comments

Comments
 (0)