Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Commit 70ee6e9

Browse files
authored
Merge pull request #194 from jamesplease/fix-global-obj
🐛 fixes globalObj being undefined in non-Node Environments like r…
2 parents 0418745 + eca89d5 commit 70ee6e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fetch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ export class Fetch extends React.Component {
420420
}
421421

422422
const globalObj = typeof self !== 'undefined' ? self : this;
423-
const AbortSignalCtr = globalObj.AbortSignal || function() {};
423+
const AbortSignalCtr =
424+
globalObj !== undefined ? globalObj.AbortSignal : function() {};
424425

425426
Fetch.propTypes = {
426427
children: PropTypes.func,

0 commit comments

Comments
 (0)