Permalink
Browse files

Fixed: Reader#bytes should also support plain arrays

  • Loading branch information...
dcodeIO committed Apr 11, 2017
1 parent 0c6e639 commit ed34b093839652db2ff7b84db87857fc57d96038
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/reader.js
@@ -306,6 +306,8 @@ Reader.prototype.bytes = function read_bytes() {
throw indexOutOfRange(this, length);
this.pos += length;
if (Array.isArray(this.buf)) // plain array
return this.buf.slice(start, end);
return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
? new this.buf.constructor(0)
: this._slice.call(this.buf, start, end);

0 comments on commit ed34b09

Please sign in to comment.