Skip to content

Commit

Permalink
PR-607 - Tweak to options setting for isEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
icenine457 committed Nov 28, 2016
1 parent 051ebd2 commit b6ec14f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/isEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ function isEmail(str, options) {
(0, _assertString2.default)(str);
options = (0, _merge2.default)(options, default_email_options);

if (options.require_display_name) {
options.allow_display_name = true;
}

if (options.allow_display_name) {
if (options.require_display_name || options.allow_display_name) {
var display_email = str.match(displayName);
if (display_email) {
str = display_email[1];
Expand Down Expand Up @@ -90,4 +86,4 @@ function isEmail(str, options) {

return true;
}
module.exports = exports['default'];
module.exports = exports['default'];

0 comments on commit b6ec14f

Please sign in to comment.