From 7196896e014f43973f1784a27e9e7e53e4be7651 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Tue, 22 Nov 2016 16:10:52 +0100 Subject: [PATCH] [FIX] web_tip: destroy method set call off() on undefined In some cases, when the destoy method of 'Tip' calls the off() function on '$breathing', even if this one is not defined. To fix this error, we check that '$breathing' is not 'undefined' before calling off() on it. --- addons/web_tip/static/src/js/tip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web_tip/static/src/js/tip.js b/addons/web_tip/static/src/js/tip.js index 921c4bb7a4d..684f1acc988 100644 --- a/addons/web_tip/static/src/js/tip.js +++ b/addons/web_tip/static/src/js/tip.js @@ -300,6 +300,8 @@ var Tip = Class.extend({ if (this.$element) { this.$element.popover('destroy'); this.$element.removeClass('oe_tip_show_element'); + } + if (this.$breathing) { this.$breathing.off().remove(); } if (this.$helper) {