diff --git a/server/services/lib/bing-results-parser.js b/server/services/lib/bing-results-parser.js index 294858380..45ee33c91 100644 --- a/server/services/lib/bing-results-parser.js +++ b/server/services/lib/bing-results-parser.js @@ -106,7 +106,7 @@ async function bingResultsParser (bingData) { } = data const name = ['postcode1', 'postcode3'].includes(data.entityType.toLowerCase()) - ? data.address.postalCode.replace(/\s/g, '') + ? data.address.postalCode : formatName(data.name) // Reverse as Bing returns as [y (lat), x (long)] diff --git a/test/services/lib/bing-results-parser.js b/test/services/lib/bing-results-parser.js index f329d3694..4cbd26969 100644 --- a/test/services/lib/bing-results-parser.js +++ b/test/services/lib/bing-results-parser.js @@ -368,7 +368,7 @@ experiment('bingResultsParser', () => { const expectedResult = [ { - name: 'HG50JL', + name: 'HG5 0JL', center: [-1.46519089, 54.00955582], bbox2k: [ -1.5045644526149113,