fix:Type 'number' is not assignable to type 'IBinChanges'.
This commit is contained in:
parent
b1ed6ba969
commit
42a33908a1
@ -82,14 +82,14 @@ export const combineInventoryChanges = (InventoryChanges: IInventoryChanges, del
|
|||||||
InventoryChanges[key] = delta[key];
|
InventoryChanges[key] = delta[key];
|
||||||
} else if (Array.isArray(delta[key])) {
|
} else if (Array.isArray(delta[key])) {
|
||||||
const left = InventoryChanges[key] as object[];
|
const left = InventoryChanges[key] as object[];
|
||||||
const right: object[] = delta[key];
|
const right: object[] = delta[key] as object[];
|
||||||
for (const item of right) {
|
for (const item of right) {
|
||||||
left.push(item);
|
left.push(item);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.assert(key.substring(-3) == "Bin");
|
console.assert(key.substring(-3) == "Bin");
|
||||||
const left = InventoryChanges[key] as IBinChanges;
|
const left = InventoryChanges[key] as IBinChanges;
|
||||||
const right: IBinChanges = delta[key];
|
const right: IBinChanges = delta[key] as IBinChanges;
|
||||||
left.count += right.count;
|
left.count += right.count;
|
||||||
left.platinum += right.platinum;
|
left.platinum += right.platinum;
|
||||||
left.Slots += right.Slots;
|
left.Slots += right.Slots;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user