[Vuejs]-How to handdle the errors in catch – vue.js

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.

👤Konrad

Leave a comment