diff --git a/src/renderer/components/run-basic-checks-dialog/book-selection.component.tsx b/src/renderer/components/run-basic-checks-dialog/book-selection.component.tsx index 29c37c050d..96ee3c9ce3 100644 --- a/src/renderer/components/run-basic-checks-dialog/book-selection.component.tsx +++ b/src/renderer/components/run-basic-checks-dialog/book-selection.component.tsx @@ -40,11 +40,15 @@ export default function BookSelection() { const [endChapter, setEndChapter] = useState(chapterCount); const onSelectChangeStartChapter = (_event: SyntheticEvent, value: unknown) => { - setStartChapter((value as ChapterNumberOption).chapterNum); + const newStartChapterNum = (value as ChapterNumberOption).chapterNum; + setStartChapter(newStartChapterNum); + if (newStartChapterNum > endChapter) setEndChapter(newStartChapterNum); }; const onSelectChangeEndChapter = (_event: SyntheticEvent, value: unknown) => { - setEndChapter((value as ChapterNumberOption).chapterNum); + const newEndChapterNum = (value as ChapterNumberOption).chapterNum; + setEndChapter(newEndChapterNum); + if (newEndChapterNum < startChapter) setStartChapter(newEndChapterNum); }; return (