@@ -68,7 +68,7 @@ class SpacesNearby extends Component {
68
68
searchQuery : prevSearchQuery ,
69
69
} ) {
70
70
const { geolocation, spaces, searchQuery } = this . props ;
71
- if ( ! geolocation . equals ( prevGeolocation ) ) {
71
+ if ( ! geolocation ? .equals ( prevGeolocation ) ) {
72
72
this . getSpacesNearby ( ) ;
73
73
}
74
74
if ( ! spaces . equals ( prevSpaces ) || searchQuery !== prevSearchQuery ) {
@@ -78,7 +78,7 @@ class SpacesNearby extends Component {
78
78
79
79
getSpacesNearby = ( ) => {
80
80
const { dispatchGetSpacesNearby, geolocation } = this . props ;
81
- if ( ! geolocation . isEmpty ( ) ) {
81
+ if ( geolocation && ! geolocation . isEmpty ( ) ) {
82
82
const {
83
83
coords : { latitude, longitude } ,
84
84
} = geolocation . toJS ( ) ;
@@ -130,7 +130,7 @@ class SpacesNearby extends Component {
130
130
}
131
131
132
132
const mapStateToProps = ( { authentication, Space } ) => ( {
133
- geolocation : authentication . getIn ( [ 'user' , 'settings' , ' geolocation'] ) ,
133
+ geolocation : authentication . getIn ( [ 'user' , 'geolocation' ] ) ,
134
134
spaces : Space . getIn ( [ 'nearby' , 'content' ] ) ,
135
135
activity : Boolean ( Space . getIn ( [ 'nearby' , 'activity' ] ) . size ) ,
136
136
geolocationEnabled : authentication . getIn ( [
0 commit comments