Skip to content

Commit

Permalink
fix(alchemy-signer): check if process is defined before reading env v…
Browse files Browse the repository at this point in the history
…ars (#508)
  • Loading branch information
Dan-Nolan authored Mar 14, 2024
1 parent 53ba81d commit bce8123
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/alchemy/src/signer/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ export type AlchemySignerClientParams = z.input<
// use this to override the parent org id for suborgs
// used for whoami passkey requests to figure out the
// suborg for a user
const ROOT_ORG_ID =
process.env.ROOT_ORG_ID ??
process.env.NEXT_PUBLIC_ROOT_ORG_ID ??
"24c1acf5-810f-41e0-a503-d5d13fa8e830";
const _ENV_ROOT_ORG_ID =
typeof process !== "undefined"
? process.env.ROOT_ORG_ID ?? process.env.NEXT_PUBLIC_ROOT_ORG_ID
: null;
const ROOT_ORG_ID = _ENV_ROOT_ORG_ID ?? "24c1acf5-810f-41e0-a503-d5d13fa8e830";

/**
* A lower level client used by the AlchemySigner used to communicate with
Expand Down

0 comments on commit bce8123

Please sign in to comment.