1👍
✅
JavaScript tries to check value of e.email.custEmailExist
, but e.email is undefined
.
Use:
if (e.email && e.email.custEmailExists == "This email existe.")
or:
if ((e.email || {}).custEmailExists == "This email existe.")
The second one is a little bit more hacky.
Source:stackexchange.com