Skip to content

Commit

Permalink
Add comment / remove debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Aug 23, 2019
1 parent 4098041 commit 5ff2f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/utils/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class BinaryWriter {
}

private write_buffer(buffer: Buffer) {
// Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser
this.buf = Buffer.concat([Buffer.from(this.buf.subarray(0, this.length)), buffer, Buffer.alloc(INITIAL_LENGTH)]);
this.length += buffer.length;
}
Expand Down Expand Up @@ -171,7 +172,6 @@ function serializeField(schema: Schema, value: any, fieldType: any, writer: any)
}

function serializeStruct(schema: Schema, obj: any, writer: any) {
console.log('serializeStruct', schema);
const structSchema = schema.get(obj.constructor);
if (!structSchema) {
throw new Error(`Class ${obj.constructor.name} is missing in schema`);
Expand Down

0 comments on commit 5ff2f19

Please sign in to comment.