Skip to content

Commit 672f7e7

Browse files
committed
fix: plugin sort value no longer shown in url if equal to the default
1 parent 063e922 commit 672f7e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pages/plugins/index.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ function updateUrlParams(): void {
185185
url.searchParams.delete("tags");
186186
}
187187

188-
url.searchParams.set("sort", sortValue);
188+
if (sortValue != DEFAULT_PLUGIN_SORT){
189+
url.searchParams.set("sort", sortValue);
190+
} else{
191+
url.searchParams.delete("sort");
192+
}
189193

190194
history.replaceState(null, "", url);
191195
}

0 commit comments

Comments
 (0)