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
- // Set initial value
302
- // this.component.value = this.phoneValue
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-kompo-utils",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "",
5
5
  "main": "app.js",
6
6
  "scripts": {