Shopmost icon indicating copy to clipboard operation
Shopmost copied to clipboard

[BUG] typing 0 in the "Show per page" field is possible, then application crashes.

Open Dzem-z opened this issue 2 years ago • 0 comments

Description In the catalog module, it is possible to put 0 in the "Show per page" bar. Application the shows either Infinity or NaN depending on if there is any element in the catalog. This bug is present in all submodules (products, categories, collections, attributes).

To Reproduce Steps to reproduce the behavior:

  1. Go to '/admin/products' or any other submodule of catalog.
  2. Input 0 into 'Show per page'.
  3. All elements disappear and there is Infinitely many pages (or NaN).

Expected behavior Application should not let user put 0 into the box.

Screenshots Screenshot from 2024-01-25 14-54-25 Screenshot from 2024-01-25 14-54-39

Background (please complete the following information):

  • NodeJS 20.10.0
  • Postgres 13.12
  • ShopMost v1.0.1 1d95be0
  • OS: Ubuntu 22.04
  • Browser Chromium

Dzem-z avatar Jan 25 '24 13:01 Dzem-z