Browse Source

fix broken ciao tests

pull/674/head
Diana Shkolnikov 8 years ago
parent
commit
cbf2d0ace5
  1. 4
      middleware/geocodeJSON.js

4
middleware/geocodeJSON.js

@ -1,6 +1,7 @@
var url = require('url');
var extend = require('extend');
var geojsonify = require('../helper/geojsonify');
var _ = require('lodash');
/**
* Returns a middleware function that converts elasticsearch
@ -79,7 +80,8 @@ function convertToGeocodeJSON(req, res, next, opts) {
function addMessages(req, msgType, geocoding) {
if (req.hasOwnProperty(msgType) && req[msgType].length) {
geocoding[msgType] = req[msgType];
// cleanup arrays to make sure there are no duplicates
geocoding[msgType] = _.uniq(req[msgType]);
}
}

Loading…
Cancel
Save