diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index c2e03207..9377795c 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -332,7 +332,7 @@ function Vbox(args) { function combinerBtn() { let text = ''; - let comboItem = 'refine'; + let comboItem = ''; if (combiner.length < 3) { for (let i = 0; i < 3; i++) { if (combiner.length > i) { @@ -342,9 +342,10 @@ function Vbox(args) { } } } else { - // Since theres 3 items in combiner and you can't have valid combos we can preview it + // Since theres 3 items in combiner and you can't have invalid combos we can preview it const combinerItems = combiner.map(j => vbox.bound[j]); - comboItem = itemInfo.combos.find(combo => combinerItems.every(c => combo.components.includes(c))).item; + const comboItemObj = itemInfo.combos.find(combo => combinerItems.every(c => combo.components.includes(c))); + comboItem = comboItemObj ? comboItemObj.item : 'refine'; text = `Combine - ${comboItem}`; }