From 7d8c0610283f5f1c6a7132a8ed50fc6c4eafd3e6 Mon Sep 17 00:00:00 2001 From: Cliff Hall Date: Tue, 1 Jul 2025 13:33:56 -0400 Subject: [PATCH] Update src/client/streamableHttp.ts nullish coalescing operator ?? instead of the logical OR operator || to handle the case where this?._eventSourceInit?.fetch or this._fetch might be null or undefined but not falsy Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/client/streamableHttp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/streamableHttp.ts b/src/client/streamableHttp.ts index af884b26..d28eae86 100644 --- a/src/client/streamableHttp.ts +++ b/src/client/streamableHttp.ts @@ -423,7 +423,7 @@ const response = await (this._fetch ?? fetch)(this._url, { signal: this._abortController?.signal, }; - const response = await (this._fetch ?? fetch)(this._url, init); +const response = await (this._fetch ?? fetch)(this._url, init); // Handle session ID received during initialization const sessionId = response.headers.get("mcp-session-id");