Skip to content

Commit

Permalink
Update view.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Sep 28, 2024
1 parent 1d4b1b0 commit e3101e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -5585,7 +5585,7 @@ view.Context = class {
if (typeof args[0] === 'number') {
const length = Math.min(this._stream.length, args[0]);
const buffer = this._stream.peek(length);
text.Reader.open(buffer);
return text.Reader.open(buffer);
}
return text.Reader.open(this._stream);
}
Expand Down Expand Up @@ -5692,8 +5692,7 @@ view.EntryContext = class {
if (encoding) {
const decoder = new TextDecoder(encoding);
const buffer = stream.peek();
const value = decoder.decode(buffer);
return value;
return decoder.decode(buffer);
}
return stream;
}
Expand Down

0 comments on commit e3101e0

Please sign in to comment.