summaryrefslogtreecommitdiff
path: root/addons/web_tour/static/src/js/tip.js
diff options
context:
space:
mode:
authorjev-odoo <jev@odoo.com>2019-06-18 07:45:55 +0000
committerjev-odoo <jev@odoo.com>2019-06-18 07:45:55 +0000
commit5bb9a8b4189eaa4cb5ed2ec10c752a9ee2993bfe (patch)
tree0bdb5529816b9161a545fc7d4ab92b1e68eb9858 /addons/web_tour/static/src/js/tip.js
parent25745d8515212b37c4eaeaf091ef9addf232f1cc (diff)
[FIX]web_tour:avoid unnecessary traceback
In certain case, a non blocking traceback pops-up. It happens when the page loads, if the dom is modified before the tour has been fully loaded. Theorical steps to reproduce: - Open a page with an active tour - Trigger any domain change before the tip-dot is loaded On every change in the DOM, the MutationObserver tries to update the page. If the tip-dot has not been loaded yet, it will try to update the position of a non-existing element. In that case, we simply ignore it. The update will be called anyway when the tip-dot has finished his loading. opws: 1923348 1965964 2011027 2008708 2001867 2000228 1998906 1972914 1972629 1963173 1961373 1956962 1949591 1947390 1947286 1944577 1944459 1941764 1938887 1936518 1935831 1934788 1934471 1934225 2006977 1970672 1931721 1931593 closes odoo/odoo#34199 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web_tour/static/src/js/tip.js')
-rw-r--r--addons/web_tour/static/src/js/tip.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js
index 8b3a8d04566..50ea07415fe 100644
--- a/addons/web_tour/static/src/js/tip.js
+++ b/addons/web_tour/static/src/js/tip.js
@@ -146,6 +146,7 @@ var Tip = Widget.extend({
},
_reposition: function () {
if (this.tip_opened) return;
+ if (!this.$el) return;
this.$el.removeClass("o_animated");
// Reverse left/right position if direction is right to left