Skip to content

Commit

Permalink
Merge pull request #2 from ideal-postcodes/fix
Browse files Browse the repository at this point in the history
fix(Binding): Check if valid country after asynchronous API Key checks
  • Loading branch information
cblanc authored Dec 3, 2019
2 parents 7472232 + 3feb6a3 commit c7b031e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion view/base/web/binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
this.hoistCountry();
this.applyAutocomplete();
this.applyPostcodeLookup();
this.detectCountry();
this.observeCountry();
this.loaded(true);
};
Expand Down Expand Up @@ -205,6 +204,7 @@
checkKey: true,
onLoaded: function() {
self._autocompleteInstances.push(controller);
self.detectCountry(); // Check if correct country is engaged
},
inputField: "#" + self.$lineOne().attr("id"),
onAddressRetrieved: self.handleAddressSelection.bind(self),
Expand Down Expand Up @@ -238,6 +238,8 @@
)
);
self._postcodeLookupInstances.push($instance);
self.detectCountry(); // Check if correct country is engaged

},
onAddressSelected: self.handleAddressSelection.bind(self),
onSearchError: self.handleError.bind(self)
Expand Down

0 comments on commit c7b031e

Please sign in to comment.