Skip to content

Commit

Permalink
Fix the import of node-fetch polyfill (#5399)
Browse files Browse the repository at this point in the history
* Fix the import of node-fetch polyfill

* Adding changeset
  • Loading branch information
jamesdaniels committed Aug 30, 2021
1 parent cd15df0 commit 6163bb2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/twelve-items-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/firestore': patch
'@firebase/storage': patch
---

Addressed incorrect use of the `node-fetch` polyfill
2 changes: 1 addition & 1 deletion packages/firestore/src/platform/node_lite/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import * as nodeFetch from 'node-fetch';
import nodeFetch from 'node-fetch';

import { DatabaseInfo } from '../../core/database_info';
import { Connection } from '../../remote/connection';
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/src/platform/node/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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

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

0 comments on commit 6163bb2

Please sign in to comment.