Skip to content

Commit

Permalink
used autoComplete route instead of another state variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ar5had committed Mar 22, 2017
1 parent 739b16f commit 94158c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Menu.js
Expand Up @@ -100,8 +100,8 @@ export default class Menu extends Component {
]

getRoute = () => {
const route = this.state.route;
if (route.length && route.every(waypoint => waypoint !== '')) {
const autoCompletes = this.state.autoCompletes;
if (autoCompletes.every(elem => elem.route !== '')) {
this.props.getRoute(this.state.route);
}
else {
Expand Down

0 comments on commit 94158c2

Please sign in to comment.