File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ export function createEnvProxy(
6767 base : NodeJS . ProcessEnv ,
6868 overrides ?: Record < string , string | undefined > ,
6969) : NodeJS . ProcessEnv {
70-
7170 return new Proxy (
7271 { } ,
7372 {
@@ -149,7 +148,10 @@ export function createEnvProxy(
149148 // Case-insensitive check.
150149 const upperProp = prop . toUpperCase ( )
151150 if ( caseInsensitiveKeys . has ( upperProp ) ) {
152- if ( overrides && findCaseInsensitiveEnvKey ( overrides , upperProp ) !== undefined ) {
151+ if (
152+ overrides &&
153+ findCaseInsensitiveEnvKey ( overrides , upperProp ) !== undefined
154+ ) {
153155 return true
154156 }
155157 if ( findCaseInsensitiveEnvKey ( base , upperProp ) !== undefined ) {
@@ -251,7 +253,9 @@ export function findCaseInsensitiveEnvKey(
251253 const targetLength = upperEnvVarName . length
252254 for ( const key of Object . keys ( env ) ) {
253255 // Fast path: bail early if lengths don't match.
254- if ( key . length !== targetLength ) continue
256+ if ( key . length !== targetLength ) {
257+ continue
258+ }
255259 // Only call toUpperCase if length matches.
256260 if ( key . toUpperCase ( ) === upperEnvVarName ) {
257261 return key
You can’t perform that action at this time.
0 commit comments