Minor fix for ranking
This commit is contained in:
parent
362dd4adca
commit
15e167ea9e
|
@ -294,12 +294,12 @@ export const bindingsToCompletions = (bindings, mode) => {
|
||||||
if (ele.icon) {
|
if (ele.icon) {
|
||||||
acc[ele.category]["icon"] = acc[ele.category]["icon"] || 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
|
acc[ele.category]["rank"] = acc[ele.category]["rank"] || ele.display.rank
|
||||||
}
|
}
|
||||||
return acc
|
return acc
|
||||||
}, {})
|
}, {})
|
||||||
|
console.log(categoryMeta)
|
||||||
const completions = Object.keys(bindingByCategory).reduce((comps, catKey) => {
|
const completions = Object.keys(bindingByCategory).reduce((comps, catKey) => {
|
||||||
const { icon, rank } = categoryMeta[catKey] || {}
|
const { icon, rank } = categoryMeta[catKey] || {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue