Skip to content

Commit 6875dc9

Browse files
authored
Merge pull request #6530 from BitGo/COIN-4804-fix-staging-vars
fix: handle for undefined process
2 parents cfafa98 + cbcc35e commit 6875dc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/statics/src/coins.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4257,6 +4257,11 @@ export function createTokenMapUsingTrimmedConfigDetails(
42574257
}
42584258

42594259
function isRunningInStaging(): boolean {
4260+
if (typeof process === 'undefined' || !process.env) {
4261+
// If process or process.env doesn't exist, we're likely in a browser.
4262+
// Return false as we can't determine the environment this way.
4263+
return false;
4264+
}
42604265
// Check explicit staging environment variables
42614266
const stagingEnvVars = [
42624267
process.env.BITGO_ENV === 'staging' || process.env.BITGO_ENV === 'staging_internal',

0 commit comments

Comments
 (0)