fix(location): fix trying to get user coords when no location

This commit is contained in:
Jonathan Rainville 2019-05-03 16:26:56 -04:00
parent e9e53bf9e1
commit a5085911a0
No known key found for this signature in database
GPG Key ID: 5F4630B759727D9C
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,9 @@ export function *loadUser({address}) {
const id = yield MetadataStore.methods.addressToUser(address).call();
user = Object.assign(user, yield MetadataStore.methods.users(id).call());
yield put({type: LOAD_USER_LOCATION, user, address});
if (user.location) {
yield put({type: LOAD_USER_LOCATION, user, address});
}
yield put({type: USER_RATING, address});
yield put({type: LOAD_USER_SUCCEEDED, user, address});
yield put({type: LOAD_ESCROWS, address});