Skip to content

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

@Dzem-z

Description

@Dzem-z

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions