Skip to content

Commit 3ddf817

Browse files
committed
fix compare order
1 parent b830a82 commit 3ddf817

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

site/static/compare.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ <h3>Cache states</h3>
246246
...bootstrap_names
247247
.map(name => name)
248248
.map(name => ({name, is_bootstrap: true, fields: to_fields_bootstrap(name)})),
249-
...test_names.map(name => ({name, fields: to_fields(name)})),
249+
...test_names.map(name => ({name, is_bootstrap: false, fields: to_fields(name)})),
250250
];
251251

252252
function to_fields_bootstrap(name) {
@@ -335,11 +335,17 @@ <h3>Cache states</h3>
335335
}
336336

337337
fields.sort((a, b) => {
338-
if (a.is_bootstrap != b.is_bootstrap) {
339-
return 1;
340-
} else {
338+
if (a.is_bootstrap == b.is_bootstrap){
341339
return b.farthest_pct - a.farthest_pct;
342340
}
341+
else{
342+
if (a.is_bootstrap){
343+
return 0;
344+
}
345+
else{
346+
return 1;
347+
}
348+
}
343349
});
344350

345351
let max_name_width = Math.max(...fields.map(f => f.max_casename_len));

0 commit comments

Comments
 (0)