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>
This commit is contained in:
parent
a3c4e28138
commit
8e02df150e
1 changed files with 1 additions and 1 deletions
|
|
@ -251,7 +251,7 @@ const fetchImpl = (this?._eventSourceInit?.fetch ?? this._fetch ?? fetch) as typ
|
|||
signal: this._abortController?.signal,
|
||||
};
|
||||
|
||||
const response = await (this._fetch ?? fetch)(this._endpoint, init);
|
||||
const response = await (this._fetch ?? fetch)(this._endpoint, init);
|
||||
if (!response.ok) {
|
||||
if (response.status === 401 && this._authProvider) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue