safety in case null combo (shouldn't happen anyway)
This commit is contained in:
parent
85497bfbf2
commit
06897e0e43
@ -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}`;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user