aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-08-22 05:28:21 +0800
committerRemco Bloemen <remco@wicked.ventures>2018-08-22 05:28:21 +0800
commit71a61a4dc331912cc015347d5cd22691ef9cd51b (patch)
treeb7d5e1942368d418f718f450c2456bf401bb87cf /packages/utils
parent1053aed74d2dcb5018a9647f21dd05e2902528fd (diff)
downloaddexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar.gz
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar.bz2
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar.lz
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar.xz
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.tar.zst
dexon-sol-tools-71a61a4dc331912cc015347d5cd22691ef9cd51b.zip
Use detect-node
Diffstat (limited to 'packages/utils')
-rw-r--r--packages/utils/src/configured_bignumber.ts3
1 files changed, 2 insertions, 1 deletions
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