feat: implement deleting of loadout configs
This commit is contained in:
parent
d65480a0bb
commit
1bf017f7b0
@ -77,6 +77,11 @@ export const handleInventoryItemConfigChange = async (
|
||||
|
||||
// all non-empty entries are one loadout slot
|
||||
for (const [loadoutId, loadoutConfig] of Object.entries(newLoadout)) {
|
||||
if (loadoutConfig.Remove) {
|
||||
loadout[loadoutSlot].pull({ _id: loadoutId });
|
||||
continue;
|
||||
}
|
||||
|
||||
const oldLoadoutConfig = loadout[loadoutSlot].find(
|
||||
loadout => loadout._id.toString() === loadoutId
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user