From 976318fcc55e02c57b774801a23c1927a8995a12 Mon Sep 17 00:00:00 2001 From: DJ1TJOO Date: Sat, 5 Feb 2022 22:54:35 +0100 Subject: [PATCH] Fixed order --- src/js/game/components/storage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/game/components/storage.js b/src/js/game/components/storage.js index 4a4f7cf0..46305929 100644 --- a/src/js/game/components/storage.js +++ b/src/js/game/components/storage.js @@ -60,15 +60,15 @@ export class StorageComponent extends Component { const itemType = item.getItemType(); - if (MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType]) { - return MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType].apply(this, [item]); - } - if (itemType !== this.storedItem.getItemType()) { // Check type matches return false; } + if (MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType]) { + return MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType].apply(this, [item]); + } + if (itemType === "color") { return /** @type {ColorItem} */ (this.storedItem).color === /** @type {ColorItem} */ (item).color; }