Skip to content

Commit

Permalink
fix: version sort (#72)
Browse files Browse the repository at this point in the history
支持根据 pre-release 及 metadata 位排序

closes #71
  • Loading branch information
elrrrrrrr committed Feb 23, 2024
1 parent 608cc3a commit f6b5394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NPMVersionSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function sortNodes(nodes: VersionNode[]): void {
if (!aVersion || !bVersion) {
return 0;
}
return semver.rcompare(aVersion, bVersion);
return semver.rcompare(a.value, b.value);
});
for (const node of nodes) {
sortNodes(node.children);
Expand Down

0 comments on commit f6b5394

Please sign in to comment.