From 1a2c1441a1d147ca727157d633e8cfdb64bb0b0f Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 5 Mar 2018 14:29:49 +0100 Subject: [PATCH] Updates #1021 Fix TypeError: Cannot read property 'firstChild' of null --- src/converse-controlbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converse-controlbox.js b/src/converse-controlbox.js index 50b74adc8..a2b1602ef 100644 --- a/src/converse-controlbox.js +++ b/src/converse-controlbox.js @@ -423,7 +423,7 @@ switchTab (ev) { if (ev && ev.preventDefault) { ev.preventDefault(); } - const tab = ev.target, + const tab = u.hasClass('msgs-indicator', ev.target) ? ev.target.parentNode : ev.target, sibling_li = tab.parentNode.nextElementSibling || tab.parentNode.previousElementSibling, sibling = sibling_li.firstChild, sibling_panel = _converse.root.querySelector(sibling.getAttribute('href')),