[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.
This commit is contained in:
Pierre Masereel
2016-11-22 17:14:02 +01:00
parent 27b6d245e7
commit 7196896e01
+2
View File
@@ -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) {