Skip to content

Commit aa79d72

Browse files
author
Adam de Baugh
committed
check for bounds null on componentDidUpdate #235
1 parent 71d19a5 commit aa79d72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
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)