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:
parent
8ed3b47850
commit
fe607e3af1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue