Skip to content

Commit 7ccc841

Browse files
authored
fix(tokenizer): Stringify non-string chunks (#1010)
1 parent 0338f5d commit 7ccc841

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Tokenizer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ export default class Tokenizer {
192192

193193
public write(chunk: string): void {
194194
if (this.ended) return this.cbs.onerror(Error(".write() after done!"));
195-
if (this.buffer.length) this.buffer += chunk;
196-
else this.buffer = chunk;
195+
this.buffer += chunk;
197196
this.parse();
198197
}
199198

0 commit comments

Comments
 (0)