mirror of
https://github.com/netfun2000/pheditor.git
synced 2026-02-27 09:45:14 +08:00
Fix JavaScript error on loading file from window hash
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user