use .some instead of reduce
This commit is contained in:
parent
880ef63720
commit
6dde5fc6f1
@ -28,8 +28,7 @@ MapConfigOverviewsAdapter.prototype.getMapConfig = function (user, requestMapCon
|
||||
const layers = results.map(result => result.layer);
|
||||
const overviewsAddedToMapconfig = results
|
||||
.map(result => result.overviewsAddedToMapconfig)
|
||||
.reduce((overviewsInMapconfig,overviewsInLayer)=>overviewsInMapconfig||overviewsInLayer,
|
||||
false);
|
||||
.some(overviewsInLayer => overviewsInLayer);
|
||||
|
||||
if (!layers || layers.length === 0) {
|
||||
return callback(new Error('Missing layers array from layergroup config'));
|
||||
|
Loading…
Reference in New Issue
Block a user