From 1bb2fccb9d92e76e8a0f1c99ebbd27cb30618444 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 7 Jan 2014 17:11:54 +0100 Subject: [PATCH] [FIX] web: avoid crash when the Home client action is called without `action` param E.g. this could happen when the HistoryBack client action was unable to restore the previous breadcrumbs item, and used the Home action as fallback. Could be reproduce by performing a successful import from an action without menu and context, such as what you get after refreshing your browser. bzr revid: odo@openerp.com-20140107161154-430y7hlf9mvtfyfe --- addons/web/static/src/js/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index c9128683f83..b51f86ba195 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -819,7 +819,7 @@ instance.web.client_actions.add("history_back", "instance.web.HistoryBack"); */ instance.web.Home = function(parent, action) { var url = '/' + (window.location.search || ''); - instance.web.redirect(url, action.params && action.params.wait); + instance.web.redirect(url, action && action.params && action.params.wait); }; instance.web.client_actions.add("home", "instance.web.Home");