Simplify location search #27

Merged
bilal.catic merged 16 commits from simplify-location-search into master 2019-09-10 17:15:10 +02:00
Showing only changes of commit fbbc0952e3 - Show all commits

View File

@@ -383,9 +383,10 @@ class Indexer {
const parsedPrice = parsePrice(price);
const locationArray = location.split(",");
const region = locationArray[0];
const municipality = locationArray[1];
const locationArray =
location && location.length > 0 ? location.split(",") : [];
const region = locationArray.length > 0 ? locationArray[0] : "";
const municipality = locationArray.length > 1 ? locationArray[1] : "";
const data = {
realEstateType: this.getCategoryId(realEstateType),