@thejob/util 1.0.4 → 1.0.5
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.
package/dist/cjs/common/utils.js
CHANGED
|
@@ -274,7 +274,7 @@ const displayNameLabel = (name, type = "full") => {
|
|
|
274
274
|
exports.displayNameLabel = displayNameLabel;
|
|
275
275
|
const displayMobileNumberLabel = (mobileNumber, options) => {
|
|
276
276
|
const { number, country } = mobileNumber;
|
|
277
|
-
const { name, dial_code } = country;
|
|
277
|
+
const { name, dial_code } = country || {};
|
|
278
278
|
if (!options?.countryName) {
|
|
279
279
|
return `${dial_code} ${number}`;
|
|
280
280
|
}
|
package/dist/esm/common/utils.js
CHANGED
|
@@ -252,7 +252,7 @@ export const displayNameLabel = (name, type = "full") => {
|
|
|
252
252
|
};
|
|
253
253
|
export const displayMobileNumberLabel = (mobileNumber, options) => {
|
|
254
254
|
const { number, country } = mobileNumber;
|
|
255
|
-
const { name, dial_code } = country;
|
|
255
|
+
const { name, dial_code } = country || {};
|
|
256
256
|
if (!options?.countryName) {
|
|
257
257
|
return `${dial_code} ${number}`;
|
|
258
258
|
}
|