Permalink
Browse files

Can't use Uint8Array#set on node < 6 buffers

  • Loading branch information...
dcodeIO committed Dec 10, 2016
1 parent c3c70fe commit b510ba258986271f07007aebc5dcfea7cfd90cf4
Showing with 13 additions and 17 deletions.
  1. +5 −7 dist/protobuf.js
  2. +1 −1 dist/protobuf.js.map
  3. +2 −2 dist/protobuf.min.js
  4. BIN dist/protobuf.min.js.gz
  5. +1 −1 dist/protobuf.min.js.map
  6. +4 −6 src/writer.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
BIN -8 Bytes (100%) dist/protobuf.min.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -602,12 +602,10 @@ BufferWriterPrototype.double = function write_double_buffer(value) {
return this.push(writeDoubleBuffer, 8, value);
};
var writeBytesBuffer = util.Buffer && util.Buffer.prototype.set // set is faster (node 6.9.1)
? writeBytes_set
: function writeBytes_copy(buf, pos, val) {
if (val.length)
val.copy(buf, pos, 0, val.length);
};
function writeBytesBuffer(buf, pos, val) {
if (val.length)
val.copy(buf, pos, 0, val.length);
};
/**
* @override

0 comments on commit b510ba2

Please sign in to comment.