
The function findMissingPages is called, but its return value is not used. The subsequent loop iterates from ps to pe, attempting to load every page in that range.
findMissingPages(ps, pe, pages.value, loadingPages.value);
for (let p = ps; p <= pe; p++) loadPage(p);
If findMissingPages is intended to identify which pages actually need fetching, you should use its return value to avoid redundant calls to loadPage. For example:
const missingPages = findMissingPages(ps, pe, pages.value, loadingPages.value);
for (const p of missingPages) {
loadPage(p);
}
(Assuming findMissingPages returns an iterable of page numbers).
If findMissingPages has no side effects and its return value is unused, it should be removed to improve code clarity.
Originally posted by @gemini-code-assist[bot] in #36 (comment)
The function
findMissingPagesis called, but its return value is not used. The subsequent loop iterates frompstope, attempting to load every page in that range.If
findMissingPagesis intended to identify which pages actually need fetching, you should use its return value to avoid redundant calls toloadPage. For example:(Assuming
findMissingPagesreturns an iterable of page numbers).If
findMissingPageshas no side effects and its return value is unused, it should be removed to improve code clarity.Originally posted by @gemini-code-assist[bot] in #36 (comment)