clamp start

This commit is contained in:
Jason Wall 2024-03-04 08:22:57 -05:00
parent 08e8e9f86e
commit 24910512ad

View File

@ -525,6 +525,15 @@ export class AppService extends createStateService(reducer, initialState) {
start = 1;
}
// clamp the start to a valid range.
if (start < 1) {
start = 1;
}
if (start > chapters[j].vss.length) {
start = chapters[j].vss.length;
}
// figure out the end verse
if (j + 1 === chapters.length) {
end = section.end.verse;