Skip to content

Commit 6163bb2

Browse files
authored
Fix the import of node-fetch polyfill (#5399)
* Fix the import of node-fetch polyfill * Adding changeset
1 parent cd15df0 commit 6163bb2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/twelve-items-wonder.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': patch
3+
'@firebase/storage': patch
4+
---
5+
6+
Addressed incorrect use of the `node-fetch` polyfill

packages/firestore/src/platform/node_lite/connection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import * as nodeFetch from 'node-fetch';
18+
import nodeFetch from 'node-fetch';
1919

2020
import { DatabaseInfo } from '../../core/database_info';
2121
import { Connection } from '../../remote/connection';

packages/storage/src/platform/node/connection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import { ErrorCode, Connection } from '../../implementation/connection';
1919
import { internalError } from '../../implementation/error';
20-
import * as nodeFetch from 'node-fetch';
20+
import nodeFetch from 'node-fetch';
2121

2222
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2323
const fetch: typeof window.fetch = nodeFetch as any;

0 commit comments

Comments
 (0)