• Robert Knight's avatar
    Stop fetching result pages if current page is empty (#119) · 13eab232
    Robert Knight authored
    Yesterday a brief issue occurred where the server reported an incorrect
    (too high) total number of results for a URL due to the search index
    being out of date. Once the client reached the end of the actually
    available results, it made queries to the search endpoint which returned
    an empty result set but had a `total` figure implying that there should
    be more pages. The client then ended up polling the server indefinitely
    for more results.
    
    This commit defensively makes the client stop fetching more result pages
    if the current page is empty.
    13eab232
search-client.js 2.79 KB