We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36fbdf2 commit 6259a4cCopy full SHA for 6259a4c
tools/automation/actions/link-check/index.js
@@ -234,9 +234,13 @@ async function main() {
234
}
235
236
for (const product in productVersions) {
237
- productVersions[product] = productVersions[product].sort((a, b) =>
238
- b.localeCompare(a, undefined, { numeric: true }),
239
- );
+ // sort "preview" last, always
+ productVersions[product] = productVersions[product].sort((a, b) => {
+ if (a === "preview" && b === "preview") return 0;
240
+ if (a === "preview") return 1;
241
+ if (b === "preview") return -1;
242
+ return b.localeCompare(a, undefined, { numeric: true });
243
+ });
244
245
246
// post-process redirects
0 commit comments