fix js list<map> support

This commit is contained in:
Liangliang He 2014-08-19 18:25:37 +08:00 committed by Roger Meier
parent 9be413fca4
commit 5d6378f61e

View File

@ -1153,9 +1153,15 @@ Thrift.Protocol.prototype = {
*/
readMapBegin: function() {
var map = this.rstack.pop();
var first = map.shift();
if (first instanceof Array) {
this.rstack.push(map);
map = first;
first = map.shift();
}
var r = {};
r.ktype = Thrift.Protocol.RType[map.shift()];
r.ktype = Thrift.Protocol.RType[first];
r.vtype = Thrift.Protocol.RType[map.shift()];
r.size = map.shift();