Skip to content

Commit

Permalink
Fix unable to handle 0 and 1
Browse files Browse the repository at this point in the history
  • Loading branch information
libraryaddict committed Jan 7, 2025
1 parent 4e77a93 commit d70ce0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AccountValLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ export class AccountValLogic {
const megaExtra: Map<Item, { count: number; shelf: string }> = new Map();

const add = (stuff: { [item: string]: number }) => {
Object.keys(stuff).forEach((k) => {
mega[k] = (mega[k] ?? 0) + stuff[k];
Object.entries(stuff).forEach(([k, v]) => {
mega[k] = (mega[k] ?? 0) + v;
});
};

Expand Down

0 comments on commit d70ce0a

Please sign in to comment.