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.
This commit is contained in:
Zalmoxisus 2014-10-11 14:22:12 +04:00
parent 8ed3b47850
commit fe607e3af1
1 changed files with 1 additions and 1 deletions

View File

@ -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);