fix undefined split function exception
This commit is contained in:
@@ -383,9 +383,10 @@ class Indexer {
|
|||||||
|
|
||||||
const parsedPrice = parsePrice(price);
|
const parsedPrice = parsePrice(price);
|
||||||
|
|
||||||
const locationArray = location.split(",");
|
const locationArray =
|
||||||
const region = locationArray[0];
|
location && location.length > 0 ? location.split(",") : [];
|
||||||
const municipality = locationArray[1];
|
const region = locationArray.length > 0 ? locationArray[0] : "";
|
||||||
|
const municipality = locationArray.length > 1 ? locationArray[1] : "";
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
realEstateType: this.getCategoryId(realEstateType),
|
realEstateType: this.getCategoryId(realEstateType),
|
||||||
|
|||||||
Reference in New Issue
Block a user