Skip to content

Commit

Permalink
Fix issues with empty Foldseek results
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Apr 15, 2024
1 parent 74261be commit e6a30e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions backend/alignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ func ReadAlignments[T any](id Id, entries []int64, jobsbase string) (AlignmentRe
}
results = append(results, *r)
}
if len(results) == 0 {
continue
}
all = append(all, results)
}
reader.Delete()
Expand Down
3 changes: 1 addition & 2 deletions frontend/ResultView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ export default {
return this.hits ? this.hits.mode : "";
},
isComplex() {
if (this.hits && this.hits.results.length > 0 && this.hits.results[0].alignments != null
&& this.hits.results[0].alignments[0].length > 0 && this.hits.results[0].alignments[0][0].complexqtm != null) {
if (this.hits?.results?.[0]?.alignments?.[0]?.complexqtm != null) {
return true;
}
return false;
Expand Down

0 comments on commit e6a30e5

Please sign in to comment.