Skip to content

Commit

Permalink
20.6.1 MNB-2364 Resolve issue with Montreal not being populated as city
Browse files Browse the repository at this point in the history
  • Loading branch information
wsajosh committed May 24, 2022
1 parent 823209f commit 0455b94
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/view/frontend/web/js/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0455b94

Please sign in to comment.