From f5d7727e2b893a9893d9d7de3e279e7ef189a8d2 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 23 Dec 2016 12:07:03 +0100 Subject: [PATCH] [FIX] mass_mailing: crash with Firefox with the breadcrumb - When opening a mass mailing - Editing it and making a change (e.g. add a block) - Click on the breadcrumb - Click "OK" on the warning popup telling your changes will be discarded - Choose another mass mailing A crash occured. This is basically the same case than in the revision 7bf80d22ddb443e635442f1a633b75a51f2a0d85 but for Firefox, for which `window` is still there `!window` returns False but is `closed` opw-702211 --- addons/mass_mailing/static/src/js/mass_mailing_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index 7b312373e8d..6adc552365a 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -235,7 +235,7 @@ snippets_editor.Class.include({ var _set_value = window.top.odoo[callback+"_updown"]; var odoo_top = window.top.odoo; window.top.odoo[callback+"_updown"] = function (value, fields_values, field_name) { - if (!window) { + if (!window || window.closed) { delete odoo_top[callback+"_updown"]; return; }