Skip to content

Commit

Permalink
Restore boolean (and numeric) properties stored in URL state (#788)
Browse files Browse the repository at this point in the history
We were processing them as strings, which meant they weren't being
incorporated as page state correctly. Follow up for:
#780
  • Loading branch information
wlach authored Aug 24, 2021
1 parent 22bdbc0 commit 3784f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
function setComponent(c) {
return function setComponentInner(ctx) {
pageState.set(queryStringParse(ctx.querystring));
pageState.set(queryStringParse(ctx.querystring, { parseNumbers: true }));
component = c;
params = ctx.params;
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pagination.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
$: {
currentPage = Number($pageState.page || 1);
currentPage = $pageState.page || 1;
}
</script>

Expand Down

0 comments on commit 3784f88

Please sign in to comment.