Skip to content

Commit

Permalink
hotfix 2: #1454
Browse files Browse the repository at this point in the history
  • Loading branch information
prefontaineman1 committed Oct 26, 2017
1 parent ad2662c commit 4ee9978
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/map/BotAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Separator from '../Separator';
// import {Actions} from 'react-native-router-flux';
import bot from '../../store/botStore';
import Address from '../../model/Address';
import BotAddress from '../../model/BotAddress';
import Button from '../Button';
import geocoding from '../../store/geocodingStore';
import {colors} from '../../constants/index';
Expand All @@ -33,7 +34,7 @@ type State = {
focused: boolean,
};

class BotAddress extends React.Component {
class BotAddressView extends React.Component {
props: Props;
state: State;
@observable mounted = false;
Expand Down Expand Up @@ -95,8 +96,9 @@ class BotAddress extends React.Component {

redirectToLocation = (coords) => {
// reset bot address to recalculate it
bot.bot.location = coords;
bot.bot.address = undefined;
bot.bot.addressData = new BotAddress();
bot.bot.location = coords;
if (bot.address) {
bot.address.location = coords;
}
Expand Down Expand Up @@ -207,7 +209,7 @@ class BotAddress extends React.Component {
}
}

export default observer(BotAddress);
export default observer(BotAddressView);

const styles = StyleSheet.create({
imageContainer: {
Expand Down

0 comments on commit 4ee9978

Please sign in to comment.