fix invalid item combiner box error

This commit is contained in:
Mashy 2019-03-01 16:05:21 +10:00
parent 904a1e8a56
commit 298c263a60

View File

@ -215,7 +215,7 @@ class ItemList extends Phaser.Scene {
if (index === -1) return false;
const item = this.children.list.filter(obj => obj instanceof Item).find(it => it.index === index);
const hitBox = this.children.list.filter(obj => obj instanceof CombinerHitBox).find(hb => hb.slot === i);
hitBox.allocate(item);
if (item) hitBox.allocate(item);
return true;
});