THRIFT-815: fix for broken list testcase

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982853 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/thrift.js b/lib/js/thrift.js
index 04a34d1..f048dbf 100644
--- a/lib/js/thrift.js
+++ b/lib/js/thrift.js
@@ -559,7 +559,7 @@
 
     readMapBegin : function(keyType,valType,size){
         
-        var map = this.rstack[this.rstack.length-1]
+        var map = this.rstack.pop()
         
         var r = {};
         r["ktype"] = Thrift.Protocol.RType[map.shift()]