[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
This commit is contained in:
parent
b2fa77fd31
commit
1bb2fccb9d
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue