Skip to content

Commit 9691e19

Browse files
Vadaskiclaude
andcommitted
fix: use !== undefined guard for existingSessionId check (#1658)
if (options.existingSessionId) silently ignored existingSessionId: "" — fix to !== undefined for correct empty string handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3d7d68f commit 9691e19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/server/src/server/streamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export class WebStandardStreamableHTTPServerTransport implements Transport {
271271
this._enableDnsRebindingProtection = options.enableDnsRebindingProtection ?? false;
272272
this._retryInterval = options.retryInterval;
273273
this._supportedProtocolVersions = options.supportedProtocolVersions ?? SUPPORTED_PROTOCOL_VERSIONS;
274-
if (options.existingSessionId) {
274+
if (options.existingSessionId !== undefined) {
275275
this.sessionId = options.existingSessionId;
276276
this._initialized = true;
277277
}

0 commit comments

Comments
 (0)