We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8ece67 commit 176d9e2Copy full SHA for 176d9e2
1 file changed
src/HTTPClientFactory.ts
@@ -25,8 +25,9 @@ import { RetryHandler } from "./middleware/RetryHandler";
25
* @returns A boolean representing the environment is node or not
26
*/
27
const isNodeEnvironment = (): boolean => {
28
- return typeof exports !== "undefined" && this.exports !== exports;
+ return new Function("try {return this === global;}catch(e){return false;}")(); // tslint:disable-line: function-constructor
29
};
30
+
31
/**
32
* @class
33
* Class representing HTTPClientFactory
0 commit comments