Skip to content

Commit b85b1e3

Browse files
committed
fix: plugin sort value no longer shown in url if equal to the default
1 parent e09e94d commit b85b1e3

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
@@ -186,7 +186,11 @@ function updateUrlParams(): void {
186186
url.searchParams.delete("tags");
187187
}
188188

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

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

0 commit comments

Comments
 (0)