Adds element existence check to avoid JS errors in welcome page.

This commit is contained in:
hristoterezov 2014-09-25 15:01:18 +03:00
parent 215656cb8b
commit 5e58327a3f
1 changed files with 6 additions and 3 deletions

9
app.js
View File

@ -1138,10 +1138,13 @@ $(document).ready(function () {
if (interfaceConfig.SHOW_JITSI_WATERMARK) {
var leftWatermarkDiv
= $("#welcome_page_header div[class='watermark leftwatermark']");
if(leftWatermarkDiv && leftWatermarkDiv.length > 0)
{
leftWatermarkDiv.css({display: 'block'});
leftWatermarkDiv.parent().get(0).href
= interfaceConfig.JITSI_WATERMARK_LINK;
}
leftWatermarkDiv.css({display: 'block'});
leftWatermarkDiv.parent().get(0).href
= interfaceConfig.JITSI_WATERMARK_LINK;
}
if (interfaceConfig.SHOW_BRAND_WATERMARK) {