Skip to content

Commit

Permalink
ts: Support empty account structs (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe authored Sep 11, 2021
1 parent adb0c56 commit e2bd41b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/src/coder/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function accountSize(
}
return idlAccount.type.fields
.map((f) => typeSize(idl, f.type))
.reduce((a, b) => a + b);
.reduce((a, b) => a + b, 0);
}

// Returns the size of the type in bytes. For variable length types, just return
Expand Down

0 comments on commit e2bd41b

Please sign in to comment.