From 5e58327a3f10dd1bfa0ce9fe2d3678e8bbd904b2 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Thu, 25 Sep 2014 15:01:18 +0300 Subject: [PATCH] Adds element existence check to avoid JS errors in welcome page. --- app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 8ec96f66a..283546eaa 100644 --- a/app.js +++ b/app.js @@ -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) {