diff --git a/CHANGELOG-PUBLIC.MD b/CHANGELOG-PUBLIC.MD index 50481b3..cd1c98b 100644 --- a/CHANGELOG-PUBLIC.MD +++ b/CHANGELOG-PUBLIC.MD @@ -73,3 +73,7 @@ MNB-1966 Fix for Quebec not populating and added CSP whitelist MNB-574 Add support for placing house number after street name +## 20.6.1 (2022-05-24) +MNB-2364 Resolve issue with Montreal not being populated as city + + diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 50481b3..cd1c98b 100755 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -73,3 +73,7 @@ MNB-1966 Fix for Quebec not populating and added CSP whitelist MNB-574 Add support for placing house number after street name +## 20.6.1 (2022-05-24) +MNB-2364 Resolve issue with Montreal not being populated as city + + diff --git a/composer.json b/composer.json index ee98f49..85ba6a7 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "shipperhq/module-address-autocomplete", "description": "ShipperHQ Address Autocomplete Tool", "type": "magento2-module", - "version": "20.6.0", + "version": "20.6.1", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/src/view/frontend/web/js/autocomplete.js b/src/view/frontend/web/js/autocomplete.js index 6b46183..9b12a9e 100644 --- a/src/view/frontend/web/js/autocomplete.js +++ b/src/view/frontend/web/js/autocomplete.js @@ -133,8 +133,9 @@ define( city = value; } else if (addressType === 'postal_town') { city = value; - } else if (addressType === 'locality' && city === '') { + } else if (addressType === 'locality' && (city === '' || value === 'Montréal')) { // Ignore if we are using one of other city values already. + // MNB-2364 Google returns sublocality_level_1 for Montreal. Always want to use Montreal city = value; } else if (addressType === 'postal_code') { postcode = value;