Skip to content

Commit 783946d

Browse files
committed
2 parents 8f8815a + 7751fa1 commit 783946d

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

packages/svelte-stores/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @layerstack/svelte-stores
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- Resolve negative counts in paginationStore ([#21](https://github.com/techniq/layerstack/pull/21))
8+
39
## 0.0.9
410

511
### Patch Changes

packages/svelte-stores/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"author": "Sean Lynch <[email protected]>",
55
"license": "MIT",
66
"repository": "techniq/layerstack",
7-
"version": "0.0.9",
7+
"version": "0.0.10",
88
"scripts": {
99
"dev": "rimraf dist && tsc -p tsconfig.build.json --watch",
1010
"build": "rimraf dist && tsc -p tsconfig.build.json",

packages/svelte-stores/src/lib/paginationStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function createState(_page: number, perPage: number, total: number) {
5050
page,
5151
perPage,
5252
total,
53-
from: Math.min(total, (page - 1) * perPage + 1),
53+
from: Math.min(total, Math.max(0, (page - 1) * perPage + 1)),
5454
to: Math.min(total, page * perPage),
5555

5656
totalPages,

sites/docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @layerstack/docs
22

3+
## 0.0.20
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`9e66821`](https://github.com/techniq/layerstack/commit/9e6682115e19fea9300c67015e5ed6ef7d9cc4e7)]:
8+
- @layerstack/svelte-stores@0.0.10
9+
310
## 0.0.19
411

512
### Patch Changes

sites/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"private": true,
77
"repository": "techniq/layerstack",
8-
"version": "0.0.19",
8+
"version": "0.0.20",
99
"scripts": {
1010
"dev": "vite dev",
1111
"build": "vite build",

0 commit comments

Comments
 (0)