Skip to content

Commit b762cae

Browse files
committed
search: prioritize web featues with baseline status
1 parent de469b1 commit b762cae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

_js/_search.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,17 @@ class Search {
261261
}
262262
});
263263

264+
// sort to prioritize the web features
265+
this.results.sort((a, b) => {
266+
console.log(a, b);
267+
if (a.baseline && a.baseline.baseline && !b.baseline) {
268+
return -1;
269+
}
270+
if (b.baseline && b.baseline.baseline && !a.baseline) {
271+
return 1;
272+
}
273+
});
274+
264275
for (let i = 0; i < this.results.length; i++) {
265276
if (i >= maxCount) break;
266277

0 commit comments

Comments
 (0)