Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't polyfill fetch for Node
  • Loading branch information
Timer committed Sep 27, 2018
commit a7f00adc70a37a5bd864bb640e818528b3514474
8 changes: 6 additions & 2 deletions packages/react-app-polyfill/jsdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
*/
'use strict';

// fetch() polyfill for making API calls.
require('whatwg-fetch');
// Make sure we're in a Browser-like environment before importing polyfills
// This prevents `fetch()` from being imported in a Node test environment
if (typeof window !== 'undefined') {
// fetch() polyfill for making API calls.
require('whatwg-fetch');
}