js-kompo-utils 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -297,10 +297,11 @@ export default {
|
|
|
297
297
|
mounted() {
|
|
298
298
|
// Close dropdown when clicking outside
|
|
299
299
|
document.addEventListener('click', this.handleClickOutside)
|
|
300
|
-
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
|
|
300
|
+
|
|
301
|
+
// `component` is not guaranteed to be bound when data() runs — see phoneValue's `?.` — and
|
|
302
|
+
// a country read as undefined there would send us asking an IP service we don't need.
|
|
303
|
+
this.selectedCountryCode = this.selectedCountryCode || this.$_config('country') || this.$_config('defaultCountry')
|
|
304
|
+
|
|
304
305
|
// A stored number always decides its own country; an empty field may ask the IP.
|
|
305
306
|
if (this.phoneValue) {
|
|
306
307
|
this.autoDetectCountryFromPhone(this.phoneValue)
|