Skip to content

Commit 3300a43

Browse files
Update src/client/sse.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>
1 parent e5167cb commit 3300a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/sse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class SSEClientTransport implements Transport {
126126
}
127127

128128
private _startOrAuth(): Promise<void> {
129-
const fetchImpl = (this?._eventSourceInit?.fetch || this._fetch || fetch) as typeof fetch
129+
const fetchImpl = (this?._eventSourceInit?.fetch ?? this._fetch ?? fetch) as typeof fetch
130130
return new Promise((resolve, reject) => {
131131
this._eventSource = new EventSource(
132132
this._url.href,

0 commit comments

Comments
 (0)