Fix JavaScript error on loading file from window hash

This commit is contained in:
Hamid
2018-09-04 10:33:04 +04:30
parent 94e0cb2400
commit aaebc720dd
+1 -1
View File
@@ -415,7 +415,7 @@ window.onload = function() {
var files = id("sidebar").getElementsByTagName("a");
for (i in files)
if (files[i].hasAttribute("data-file") && files[i].getAttribute("data-file") == hash.substring(1)) {
if (typeof files[i] == "object" && files[i].hasAttribute("data-file") && files[i].getAttribute("data-file") == hash.substring(1)) {
files[i].click();
break;