Skip to content

Commit fbb534d

Browse files
committed
quic: fixes undefined handle in QuicStream kInspect
If the #handle is not of a stream, while kInspect is called `DataViewPrototypeGetByteLength` will throw. Signed-off-by: Marten Richter <marten.richter@freenet.de>
1 parent 6398c10 commit fbb534d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/internal/quic/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,8 @@ class QuicStreamState {
969969
}
970970

971971
[kInspect](depth, options) {
972-
if (DataViewPrototypeGetByteLength(this.#handle) === 0) {
972+
if (this.#handle === undefined ||
973+
DataViewPrototypeGetByteLength(this.#handle) === 0) {
973974
return 'QuicStreamState { <Closed> }';
974975
}
975976

0 commit comments

Comments
 (0)