Klipy issue when "Limit infinite search results" is set

The Klipy categories are not paginated, it’s a single call to get all categories.
However, there is a @loadMore={{this.loadMore}}.

When the “Limit infinite search results” option is enabled, loadMore triggers and Klipy gives an error because there is no q parameter.

Solution:

  • remove loadMore from the category display, see PR
4 Likes

Additionally pressing backspace on an empty search field also crashes the component if limit_infinite_search_results is enabled (not just on Klipy).

This condition seems to be the problem. I guess it tries to combine too many things in one.

    const meetsLengthRequirement = skipLengthCheck || this.query.length > 2;
    if (
      (meetsLengthRequirement && !settings.limit_infinite_search_results) ||
      (settings.limit_infinite_search_results &&
        this.currentGifs.length < settings.max_results_limit)
    ) 

1 Like