Skip to content

Commit

Permalink
decodeDelimited always forks if writer is specified, see #531
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Dec 9, 2016
1 parent 4157a0e commit 55db92e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ TypePrototype.encode = function encode(message, writer) {
* @returns {Writer} writer
*/
TypePrototype.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
return this.encode(message, writer && writer.fork() || writer).ldelim();
};

/**
Expand Down

0 comments on commit 55db92e

Please sign in to comment.