From 5bb9a8b4189eaa4cb5ed2ec10c752a9ee2993bfe Mon Sep 17 00:00:00 2001 From: jev-odoo Date: Tue, 18 Jun 2019 07:45:55 +0000 Subject: [PATCH] [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) --- addons/web_tour/static/src/js/tip.js | 1 + 1 file changed, 1 insertion(+) 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