fix: doesn't autoload on pages that don't have pages to load (#270)

* fix: no autoload on singular pages without next page

* fix: formatted
This commit is contained in:
Sriram Hariharan
2024-10-04 22:20:28 -05:00
committed by GitHub
parent 6a363aeb5c
commit 88eeb620ae
2 changed files with 10 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ export async function loadNextCourseCatalogPage(): Promise<[AutoLoadStatusType,
* @param doc the document to get the next button from
* @returns the next button from the document
*/
function getNextButton(doc: Document) {
export function getNextButton(doc: Document) {
return doc.querySelector<HTMLAnchorElement>(NEXT_PAGE_BUTTON_SELECTOR);
}