From fe607e3af11a7db9947f30ae3c7b0f777b405927 Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Sat, 11 Oct 2014 14:22:12 +0400 Subject: [PATCH] Fixes the error: Cannot read property 'nextSibling' of null When enter an existing room without participants, it gives the error: Cannot read property 'nextSibling' of null. As a result first, script execution is stopped, and the first user cannot be connected. This condition fixes the issue. --- contact_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contact_list.js b/contact_list.js index fe69e10d0..8e86a0816 100644 --- a/contact_list.js +++ b/contact_list.js @@ -57,7 +57,7 @@ var ContactList = (function (my) { var clElement = contactlist.get(0); if (resourceJid === Strophe.getResourceFromJid(connection.emuc.myroomjid) - && $('#contactlist>ul .title')[0].nextSibling.nextSibling) + && $('#contactlist>ul .title')[0].nextSibling && $('#contactlist>ul .title')[0].nextSibling.nextSibling) { clElement.insertBefore(newContact, $('#contactlist>ul .title')[0].nextSibling.nextSibling);