From 8932d3ead210c5ec70bd0efd4f620a754d7bca77 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 27 Jun 2026 14:05:22 +0200 Subject: [PATCH] quic: fixes undefined handle in QuicStream kInspect If the #handle is undefined and not QuicStream, while kInspect is called `DataViewPrototypeGetByteLength` will throw. Signed-off-by: Marten Richter --- lib/internal/quic/state.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/quic/state.js b/lib/internal/quic/state.js index 22763c1df31b68..8815b0bb4c32cf 100644 --- a/lib/internal/quic/state.js +++ b/lib/internal/quic/state.js @@ -933,7 +933,8 @@ class QuicStreamState { } [kInspect](depth, options) { - if (DataViewPrototypeGetByteLength(this.#handle) === 0) { + if (this.#handle === undefined || + DataViewPrototypeGetByteLength(this.#handle) === 0) { return 'QuicStreamState { }'; }