commit | 1d30558c8c09d08a60f6ddc602b6994cfc9f74b3 | [log] [tgz] |
---|---|---|
author | radekg <radek@gruchalski.com> | Thu Jan 01 20:35:01 2015 +0100 |
committer | Roger Meier <roger@apache.org> | Sun Jan 04 13:55:52 2015 +0100 |
tree | bf6095dd78b65577e272a590a4aeb98080053457 | |
parent | 8bcfdd98ae59d840b677a485b74dda3953b4bcc1 [diff] |
THRIFT-2923 Initialise tpos and tstack in the Protocol constructor so writing to a protocol without a message does not fail. This closes: #342
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js index 79c921c..35f679c 100644 --- a/lib/js/src/thrift.js +++ b/lib/js/src/thrift.js
@@ -684,6 +684,8 @@ * var protocol = new Thrift.Protocol(transport); */ Thrift.TJSONProtocol = Thrift.Protocol = function(transport) { + this.tstack = []; + this.tpos = []; this.transport = transport; };