From 15e167ea9eaf674217a9391f0d12a7f6ef79cdd1 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 29 May 2023 22:03:29 +0100 Subject: [PATCH] Minor fix for ranking --- packages/builder/src/components/common/CodeEditor/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/common/CodeEditor/index.js b/packages/builder/src/components/common/CodeEditor/index.js index cffeeeae0f..0e6c9f5d46 100644 --- a/packages/builder/src/components/common/CodeEditor/index.js +++ b/packages/builder/src/components/common/CodeEditor/index.js @@ -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] || {}