react-multi-email
Advanced tools
Comparing version 1.0.17 to 1.0.18
@@ -106,5 +106,5 @@ "use strict"; | ||
var validEmails, inputValue, re, isEmail, addEmails, setArr, arr, validateResult, validateResultWithDisplayName, email, validateResult, validateResultWithDisplayName, email; | ||
var _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
var _a, _b; | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
case 0: | ||
@@ -130,3 +130,3 @@ validEmails = []; | ||
arr = __spreadArray([], __read(setArr), false); | ||
_b.label = 1; | ||
_c.label = 1; | ||
case 1: | ||
@@ -136,3 +136,3 @@ validateResult = isEmail('' + arr[0].trim()); | ||
if (validateResult) { | ||
addEmails('' + arr.shift()); | ||
addEmails('' + ((_a = arr.shift()) === null || _a === void 0 ? void 0 : _a.trim())); | ||
} | ||
@@ -143,3 +143,3 @@ else { | ||
if (validateResultWithDisplayName) { | ||
email = stripDisplayName ? (_a = arr.shift()) === null || _a === void 0 ? void 0 : _a.split("<")[1].split(">")[0] : arr.shift(); | ||
email = stripDisplayName ? (_b = arr.shift()) === null || _b === void 0 ? void 0 : _b.split("<")[1].split(">")[0] : arr.shift(); | ||
addEmails('' + email); | ||
@@ -166,3 +166,3 @@ } | ||
case 3: | ||
if ((_b.sent()) === true) { | ||
if ((_c.sent()) === true) { | ||
addEmails('' + arr.shift()); | ||
@@ -179,6 +179,6 @@ setSpinning(false); | ||
} | ||
_b.label = 4; | ||
_c.label = 4; | ||
case 4: | ||
if (arr.length) return [3 /*break*/, 1]; | ||
_b.label = 5; | ||
_c.label = 5; | ||
case 5: return [3 /*break*/, 11]; | ||
@@ -215,3 +215,3 @@ case 6: | ||
case 8: | ||
if ((_b.sent()) === true) { | ||
if ((_c.sent()) === true) { | ||
addEmails(value); | ||
@@ -223,7 +223,7 @@ setSpinning(false); | ||
} | ||
_b.label = 9; | ||
_c.label = 9; | ||
case 9: return [3 /*break*/, 11]; | ||
case 10: | ||
inputValue = value; | ||
_b.label = 11; | ||
_c.label = 11; | ||
case 11: | ||
@@ -230,0 +230,0 @@ setEmails(__spreadArray(__spreadArray([], __read(emails), false), __read(validEmails), false)); |
@@ -52,3 +52,3 @@ "use strict"; | ||
const findEmailAddress = React.useCallback((value, isEnter) => __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
var _a, _b; | ||
const validEmails = []; | ||
@@ -77,3 +77,3 @@ let inputValue = ''; | ||
if (validateResult) { | ||
addEmails('' + arr.shift()); | ||
addEmails('' + ((_a = arr.shift()) === null || _a === void 0 ? void 0 : _a.trim())); | ||
} | ||
@@ -85,3 +85,3 @@ else { | ||
// Strip display name from email formatted as such "First Last <first.last@domain.com>" | ||
const email = stripDisplayName ? (_a = arr.shift()) === null || _a === void 0 ? void 0 : _a.split("<")[1].split(">")[0] : arr.shift(); | ||
const email = stripDisplayName ? (_b = arr.shift()) === null || _b === void 0 ? void 0 : _b.split("<")[1].split(">")[0] : arr.shift(); | ||
addEmails('' + email); | ||
@@ -88,0 +88,0 @@ } |
{ | ||
"name": "react-multi-email", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"jsnext:main": "dist/es6/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/es6/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127431