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>
This commit is contained in:
Cliff Hall 2025-07-01 13:33:56 -04:00 • committed by GitHub
commit 7d8c061028
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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");