From 71a61a4dc331912cc015347d5cd22691ef9cd51b Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Tue, 21 Aug 2018 14:28:21 -0700 Subject: Use detect-node --- packages/utils/src/configured_bignumber.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/utils') diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts index 977042f1e..f97452337 100644 --- a/packages/utils/src/configured_bignumber.ts +++ b/packages/utils/src/configured_bignumber.ts @@ -12,7 +12,8 @@ BigNumber.config({ }); // Set a debug print function for NodeJS -if (typeof window === 'undefined') { // Check if running in NodeJS +import isNode = require('detect-node'); +if (!isNode) { const util = require('util'); // Set a custom util.inspect function -- cgit v1.2.3