diff --git a/ts/src/coder/common.ts b/ts/src/coder/common.ts index cc93f80302..ad2678ff45 100644 --- a/ts/src/coder/common.ts +++ b/ts/src/coder/common.ts @@ -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