@bigbinary/neeto-molecules 3.2.13 → 3.2.14
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/PhoneNumber.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useField } from 'formik';
|
|
|
6
6
|
import { shallow } from 'zustand/shallow';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { getCountries, getCountryCallingCode, isValidPhoneNumber, parsePhoneNumber, formatIncompletePhoneNumber } from 'libphonenumber-js/min';
|
|
9
|
-
import { noop } from '@bigbinary/neeto-cist';
|
|
9
|
+
import { noop, isNotPresent } from '@bigbinary/neeto-cist';
|
|
10
10
|
import Input from '@bigbinary/neetoui/Input';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import Select from '@bigbinary/neetoui/Select';
|
|
@@ -335,6 +335,7 @@ var PhoneNumber = function PhoneNumber(_ref) {
|
|
|
335
335
|
showEmoji = _ref$showEmoji === void 0 ? false : _ref$showEmoji,
|
|
336
336
|
children = _ref.children,
|
|
337
337
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
338
|
+
if (isNotPresent(value) && isNotPresent(children)) return null;
|
|
338
339
|
var _getPhoneData = getPhoneData(value || children, defaultCountry),
|
|
339
340
|
international = _getPhoneData.international,
|
|
340
341
|
countryCode = _getPhoneData.countryCode;
|