diff --git a/src/main/webapp/javascript/spotCompare.js b/src/main/webapp/javascript/spotCompare.js index 2f89ff56f5..2a36681778 100755 --- a/src/main/webapp/javascript/spotCompare.js +++ b/src/main/webapp/javascript/spotCompare.js @@ -40,8 +40,10 @@ function overlaps(arr1, arr2) { } function hashDir(dir) { - if (dir.length != 36) return dir; - return dir.substr(0,1) + '/' + dir.substr(1,1) + '/' + dir; + if (typeof dir !== 'undefined') { + if (dir.length != 36) return dir; + return dir.substr(0,1) + '/' + dir.substr(1,1) + '/' + dir; + } } function spotDisplayInit(xml) {