[FIX] chatter: yet another protection against reloading a non-existing menu

bzr revid: tde@openerp.com-20130508113952-29a1xk9holyvhc13
This commit is contained in:
Thibault Delavallée 2013-05-08 13:39:52 +02:00
parent ea0316e3f1
commit 2a2a539be6
1 changed files with 1 additions and 1 deletions

View File

@ -1710,7 +1710,7 @@ openerp.mail = function (session) {
*/
do_reload_menu_emails: function () {
var menu = session.webclient.menu;
if (!menu) {
if (!menu || !menu.current_menu) {
return $.when();
}
return menu.rpc("/web/menu/load_needaction", {'menu_ids': [menu.current_menu]}).done(function(r) {