提交 4b5e6444 编写于 作者: D Daniel Imms

Fix error in stream.ts

上级 4ef823ab
......@@ -148,7 +148,7 @@ export function readToMatchingString(file: string, matchingString: string, chunk
bytesRead += moreBytesRead;
const newLineIndex = buffer.indexOf(matchingString);
if (buffer.indexOf('\n') >= 0) {
if (newLineIndex >= 0) {
return end(null, buffer.toString('utf8').substr(0, newLineIndex));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册