Skip to content

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejulius committed May 9, 2022
1 parent 418bf04 commit 4a817fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions helper/type_mapping_discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const logger = require('pelias-logger').get('api:type_mapping_discovery');
/**
* This module allows discovery of the sources and layers used
* in an existing elasticsearch index.
*
*
* note: this will override any previously configured type mappings.
*/

Expand Down Expand Up @@ -43,15 +43,15 @@ module.exports = (tm, done) => {
if( _.has(res, 'hits.total') ) {
totalHits = _.isPlainObject(res.hits.total) ? res.hits.total.value : res.hits.total;
}

// query error
if( err ){ logger.error( err ); }

// invalid response
else if ( totalHits < 1 ){
logger.error( 'no hits for aggregation' );
}

// valid response
else {

Expand All @@ -78,4 +78,4 @@ module.exports = (tm, done) => {

if ('function' === typeof done) { done(); }
});
};
};

0 comments on commit 4a817fb

Please sign in to comment.