Skip to content

Commit 78d2738

Browse files
authored
Fix how we enable fetch streams. (#7569)
* Fix how we enable fetch streams. * Create nervous-cups-relax.md
1 parent cc77a2a commit 78d2738

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/nervous-cups-relax.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/firestore": patch
3+
"@firebase/webchannel-wrapper": patch
4+
---
5+
6+
Fix how we enable fetch streams.

packages/firestore/src/platform/browser/webchannel_connection.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
WebChannel,
2323
WebChannelError,
2424
WebChannelOptions,
25-
FetchXmlHttpFactory,
2625
XhrIo,
2726
getStatEventTarget,
2827
EventTarget,
@@ -209,7 +208,7 @@ export class WebChannelConnection extends RestConnection {
209208
}
210209

211210
if (this.useFetchStreams) {
212-
request.xmlHttpFactory = new FetchXmlHttpFactory({});
211+
request.useFetchStreams = true;
213212
}
214213

215214
this.modifyHeadersForRequest(

packages/webchannel-wrapper/src/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export interface WebChannelOptions {
108108
internalChannelParams?: {
109109
forwardChannelRequestTimeoutMs?: number;
110110
};
111+
useFetchStreams?: boolean;
111112
xmlHttpFactory?: unknown;
112113
requestRefreshThresholds?: { [key: string]: number };
113114
}

0 commit comments

Comments
 (0)