Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Fixed a JS undefined error case, occurring when search field is empty.

luccioman1f4f0eacc263
diff --git a/htroot/yacysearchtrailer.html b/htroot/yacysearchtrailer.html
index 5511c8de8..6fae522aa 100644
--- a/htroot/yacysearchtrailer.html
+++ b/htroot/yacysearchtrailer.html
@@ -1,5 +1,5 @@
<script>
- if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
+ if (document.getElementById("progressbar") != null && document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
document.getElementById("progressbar").setAttribute('style',"width:100%");
document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");
document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");