Return value from process.env if it exists
This commit is contained in:
parent
00464f7144
commit
7863774dca
@ -5,8 +5,8 @@ declare global {
|
||||
}
|
||||
|
||||
const getEnv = (key: string): string | undefined => {
|
||||
if (!global.window || !global.window.env) {
|
||||
return;
|
||||
if (global.process?.env) {
|
||||
return global.process.env[key];
|
||||
}
|
||||
const value = global.window.env[key];
|
||||
if (value === "") {
|
||||
|
Loading…
Reference in New Issue
Block a user