Skip to content

Commit

Permalink
docs: update example without switch on status (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt authored Jun 3, 2020
1 parent c53d5ce commit 090141d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,10 @@ client
timeout: 1000, // milliseconds
})
.then((r) => {
if (r.data.status === Status.OK) {
console.log(r.data.results[0].elevation);
} else {
console.log(r.data.error_message);
}
console.log(r.data.results[0].elevation);
})
.catch((e) => {
console.log(e);
console.log(e.response.data.error_message);
});
```

Expand Down

0 comments on commit 090141d

Please sign in to comment.