diff --git a/include/websock.js b/include/websock.js index 9d6a306..7d12644 100644 --- a/include/websock.js +++ b/include/websock.js @@ -172,7 +172,10 @@ function decode_message(data) { //Util.Debug(">> decode_message: " + data); if (mode === 'binary') { // push arraybuffer values onto the end - rQ.push.apply(rQ, (new Uint8Array(data))); + var u8 = new Uint8Array(data); + for (var i = 0; i < u8.length; i++) { + rQ.push(u8[i]); + } } else { // base64 decode and concat to the end rQ = rQ.concat(Base64.decode(data, 0));