mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
clamp start
This commit is contained in:
parent
08e8e9f86e
commit
24910512ad
@ -525,6 +525,15 @@ export class AppService extends createStateService(reducer, initialState) {
|
|||||||
start = 1;
|
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
|
// figure out the end verse
|
||||||
if (j + 1 === chapters.length) {
|
if (j + 1 === chapters.length) {
|
||||||
end = section.end.verse;
|
end = section.end.verse;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user