From 3ff3e71d343cc7aaa761b39b2c9fa28aed95d8e0 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Thu, 10 Oct 2019 15:08:40 +0530 Subject: [PATCH] chore: make communication list exception helpful * fixes infinite error recursion caused by window.history.back(); * throw an actually useful message instead of using msgprint Signed-off-by: Chinmay D. Pai --- frappe/public/js/frappe/views/inbox/inbox_view.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frappe/public/js/frappe/views/inbox/inbox_view.js b/frappe/public/js/frappe/views/inbox/inbox_view.js index 72a28c6489..2b35d38683 100644 --- a/frappe/public/js/frappe/views/inbox/inbox_view.js +++ b/frappe/public/js/frappe/views/inbox/inbox_view.js @@ -17,9 +17,7 @@ frappe.views.InboxView = class InboxView extends frappe.views.ListView { frappe.set_route("List", "Communication", "Inbox", email_account); return true; } else if (!route[3] || (route[3] !== "All Accounts" && !is_valid(route[3]))) { - frappe.msgprint(__('Invalid Email Account')); - window.history.back(); - return true; + frappe.throw(__('No email account associated with the User. Please add an account under User > Email Inbox.')); } return false;