Skip to content

Commit

Permalink
FIX: handle rare empty results case in legacy Modified Groth spot pat…
Browse files Browse the repository at this point in the history
…tern matching results. Consider cherry-picking to Sharkbook.ai as well.
  • Loading branch information
holmbergius committed Oct 17, 2024
1 parent 6713f57 commit fe2b17b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/webapp/javascript/spotCompare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fe2b17b

Please sign in to comment.