From 9920505c03bda50126c2244fa1a3fa0e900d70e2 Mon Sep 17 00:00:00 2001 From: Dariusz Szut Date: Wed, 8 Jul 2020 11:32:45 +0200 Subject: [PATCH] EZP-31730: [Content-Tree] Uncaught TypeError: Cannot read property 'contains' of undefined --- .../Resources/public/js/scripts/helpers/tooltips.helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js b/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js index 9a7312875b..3fdfb4140c 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js @@ -1,4 +1,4 @@ -(function (global, doc, eZ, $) { +(function(global, doc, eZ, $) { let lastInsertTooltipTarget = null; const TOOLTIPS_SELECTOR = '[title]'; const observerConfig = { @@ -12,7 +12,7 @@ if (removedNodes.length) { removedNodes.forEach((removedNode) => { - if (!removedNode.classList.contains('ez-tooltip')) { + if (removedNode.classList && !removedNode.classList.contains('ez-tooltip')) { lastInsertTooltipTarget = null; doc.querySelectorAll('.ez-tooltip.show').forEach((tooltipNode) => { tooltipNode.remove();