Skip to content

Commit

Permalink
err fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
olgazh565 committed Oct 18, 2023
1 parent e44632e commit 63716cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ const init = async () => {
});
new ProductList().mount(new Main().element, products, slug);

pagination.totalProducts > pagination.limit ? new Pagination()
.mount(new ProductList().containerElement)
.update(pagination) : '';
pagination?.totalProducts > pagination?.limit ?
new Pagination()
.mount(new ProductList().containerElement)
.update(pagination) : '';
router.updatePageLinks();
},
{
Expand Down Expand Up @@ -101,7 +102,7 @@ const init = async () => {
products?.length ? 'Избранное' :
'В избранном пока нет товаров',
);
pagination.totalProducts > pagination.limit ?
pagination?.totalProducts > pagination?.limit ?
new Pagination()
.mount(new ProductList().containerElement)
.update(pagination) : '';
Expand Down

0 comments on commit 63716cb

Please sign in to comment.