Skip to content

Commit

Permalink
Merge pull request #46 from konecty/feat/process-env
Browse files Browse the repository at this point in the history
fix: fix global
  • Loading branch information
7sete7 authored Feb 23, 2024
2 parents db2ef3f + 207f23a commit ba8c8bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/getEnv.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).process = (global as any).process ?? { env: {} };
(globalThis as any).process = (globalThis as any).process ?? { env: {} };

export function getEnvVariable(name: string): string | undefined {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (global as any).process.env[name];
return (globalThis as any).process.env[name];
}

0 comments on commit ba8c8bf

Please sign in to comment.