fix: Check if user has no associated email accounts. (#22355)
check that the return array does not exist, is not an array, or is empty http://stackoverflow.com/questions/24403732/ddg#24403771
This commit is contained in:
parent
970a740164
commit
9d8c6012a2
1 changed files with 1 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ frappe.ui.form.on("User", {
|
|||
email: frm.doc.email,
|
||||
},
|
||||
callback: function (r) {
|
||||
if (!Array.isArray(r.message)) {
|
||||
if (!Array.isArray(r.message) || !r.message.length) {
|
||||
frappe.route_options = {
|
||||
email_id: frm.doc.email,
|
||||
awaiting_password: 1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue