diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 02551acc..8152aad6 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -177,12 +177,13 @@ function Vbox(args) { } const combinerItems = combiner.map(j => vbox.bound[j]); + const combinerCount = countBy(combinerItems, co => co); + const comboHighlight = combinerItems.length > 0 && itemInfo.combos.some(combo => { if (combo.components.includes(v)) { return combinerItems.every(c => { if (!combo.components.includes(c)) return false; const comboCount = countBy(combo.components, co => co); - const combinerCount = countBy(combinerItems, co => co); if (combinerCount[c] > comboCount[c]) return false; if (c === v && combinerCount[c] + 1 > comboCount[c]) return false; return true; @@ -264,12 +265,13 @@ function Vbox(args) { } const combinerItems = combiner.map(j => vbox.bound[j]); + const combinerCount = countBy(combinerItems, co => co); + const comboHighlight = combinerItems.length > 0 && itemInfo.combos.some(combo => { if (combo.components.includes(v)) { return combinerItems.every(c => { if (!combo.components.includes(c)) return false; const comboCount = countBy(combo.components, co => co); - const combinerCount = countBy(combinerItems, co => co); if (combinerCount[c] > comboCount[c]) return false; if (c === v && combinerCount[c] + 1 > comboCount[c]) return false; return true;