mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
fix zero length env var (#3496)
This commit is contained in:
@@ -30,7 +30,7 @@ JSC_DEFINE_CUSTOM_GETTER(jsGetterEnvironmentVariable, (JSGlobalObject * globalOb
|
||||
if (UNLIKELY(name.len == 0))
|
||||
return JSValue::encode(jsUndefined());
|
||||
|
||||
if (!Bun__getEnvValue(globalObject, &name, &value) || value.len == 0) {
|
||||
if (!Bun__getEnvValue(globalObject, &name, &value)) {
|
||||
return JSValue::encode(jsUndefined());
|
||||
}
|
||||
|
||||
@@ -144,4 +144,4 @@ JSValue createEnvironmentVariablesMap(Zig::GlobalObject* globalObject)
|
||||
|
||||
return object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user