Skip to content

Commit

Permalink
Remove redundant if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Aug 14, 2017
1 parent 6ae35e1 commit 5afaa6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class StreamReader {
this.peekQueue.unshift(peekData.slice(length));
}
return Promise.resolve(length);
} else if (length > peekData.length) {
} else {
peekData.copy(buffer as Buffer, offset);
return this.read(buffer, offset + peekData.length, length - peekData.length).then((bytesRead) => {
return peekData.length + bytesRead;
Expand Down

0 comments on commit 5afaa6a

Please sign in to comment.