Minor fix for ranking

This commit is contained in:
Dean 2023-05-29 22:03:29 +01:00
parent 362dd4adca
commit 15e167ea9e
1 changed files with 2 additions and 2 deletions

View File

@ -294,12 +294,12 @@ export const bindingsToCompletions = (bindings, mode) => {
if (ele.icon) {
acc[ele.category]["icon"] = acc[ele.category]["icon"] || ele.icon
}
if (ele.display?.rank) {
if (typeof ele.display?.rank == "number") {
acc[ele.category]["rank"] = acc[ele.category]["rank"] || ele.display.rank
}
return acc
}, {})
console.log(categoryMeta)
const completions = Object.keys(bindingByCategory).reduce((comps, catKey) => {
const { icon, rank } = categoryMeta[catKey] || {}