Skip to content

Commit

Permalink
page size config, not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
erosb committed Jan 5, 2020
1 parent feb72d4 commit 670d59e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ function versionSearchResponseArrived(resp) {

function mvnSearchResponseArrived(resp) {
const hits = JSON.parse(resp).response.docs;

if (hits.length === 0) {
console.error(`no results`)
newSearch();
return;
}

lastSearchResults = hits.map(val => {
return {
Expand All @@ -54,6 +60,7 @@ function mvnSearchResponseArrived(resp) {
inquirer.prompt({
type: "list",
name: "coordinates",
"pageSize": 30,
choices
}).then(answers => {
const ans = answers.coordinates;
Expand Down

0 comments on commit 670d59e

Please sign in to comment.