@modernman00/shared-js-lib 1.2.4 → 1.2.6

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.
Files changed (2) hide show
  1. package/CountryCode.js +5 -4
  2. package/package.json +1 -1
package/CountryCode.js CHANGED
@@ -204,8 +204,9 @@ const countryCodes = {
204
204
  };
205
205
 
206
206
  export const injectCountryCode = async (countryId, mobileId) => {
207
- id(countryId).addEventListener('change', async (e) => {
208
- const value = e.target.value;
209
- id(mobileId).value = (await countryCodes[value]) || '';
210
- });
207
+ if (countryId !== null && mobileId !== null)
208
+ id(countryId).addEventListener('change', async (e) => {
209
+ const value = e.target.value;
210
+ id(mobileId).value = (await countryCodes[value]) || '';
211
+ });
211
212
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernman00/shared-js-lib",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Reusable JS utilities for numerous js problems",
5
5
  "homepage": "https://github.com/modernman00/shared-js-lib#readme",
6
6
  "keywords": [