Skip to content

Commit

Permalink
fix: fix incrementBatch (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnagydavid authored Oct 21, 2024
1 parent 4af1e7f commit 7b4c4f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapter/inmemory/inMemoryKeyValueDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class InMemoryKeyValueDB implements CommonKeyValueDB {
this.data[table] ||= {}

return entries.map(([id, by]) => {
const newValue = ((this.data[table]![id] as number | undefined) || 0) + by
const newValue = Number(this.data[table]![id] || 0) + by
this.data[table]![id] = newValue
return [id, newValue]
})
Expand Down

0 comments on commit 7b4c4f2

Please sign in to comment.