Commit 32e115b8 authored by pythongosssss's avatar pythongosssss
Browse files

prevent crashing if the widget cant be found

parent c5d7593c
......@@ -27,10 +27,10 @@ const ext = {
const clickedComboValue = currentNode.widgets
.filter(w => w.type === "combo" && w.options.values.length === values.length)
.find(w => w.options.values.every((v, i) => v === values[i]))
.value;
?.value;
let selectedIndex = values.findIndex(v => v === clickedComboValue);
let selectedItem = displayedItems?.[selectedIndex];
let selectedIndex = clickedComboValue ? values.findIndex(v => v === clickedComboValue) : 0;
let selectedItem = displayedItems[selectedIndex];
updateSelected();
// Apply highlighting to the selected item
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment