Skip to content

Commit

Permalink
fixed issue with null email
Browse files Browse the repository at this point in the history
  • Loading branch information
reed-tom committed Nov 11, 2024
1 parent 33eaa47 commit 8275162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const App = () => {

const validateEmail = (email) => {
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
return re.test(String(email).toLowerCase()) || !email;
};

const getJSON = (url, callback) => {
Expand Down

0 comments on commit 8275162

Please sign in to comment.