Skip to content

Commit

Permalink
Restore undefined end test case
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 5, 2024
1 parent ffda4d8 commit 1216373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/indexedFasta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ export default class IndexedFasta {
async _fetchFromIndexEntry(
indexEntry: IndexEntry,
min = 0,
max: number,
max?: number,
opts?: BaseOpts,
) {
let end = max
if (min < 0) {
throw new TypeError('regionStart cannot be less than 0')
}
if (end > indexEntry.length) {
if (end === undefined || end > indexEntry.length) {
end = indexEntry.length
}
if (min >= end) {
Expand Down

0 comments on commit 1216373

Please sign in to comment.