Skip to content

Commit

Permalink
Fix query disappearing when changing repos limit on /repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
isker committed Nov 28, 2023
1 parent 75edfdc commit 14bd2b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thirty-rings-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"neogrok": patch
---

Fix query disappearing when changing repos limit on /repositories
3 changes: 2 additions & 1 deletion src/routes/repositories/route-list-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export const updateRouteListQuery = ({
const baselineUrl = get(navigating)?.to?.url ?? get(page).url;
const listQuery = parseSearchParams(baselineUrl.searchParams);

const queryChanged = (query || undefined) !== listQuery.query;
const queryChanged =
query !== undefined && (query || undefined) !== listQuery.query;
const reposChanged =
repos !== undefined && repos >= 0 && repos !== listQuery.repos;

Expand Down

0 comments on commit 14bd2b4

Please sign in to comment.