8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
node_env_var.cc
1 parent 8f64347 commit 4754c69Copy full SHA for 4754c69
src/node_env_var.cc
@@ -417,14 +417,14 @@ static Intercepted EnvGetter(Local<Name> property,
417
MaybeLocal<String> value_string =
418
env->env_vars()->Get(env->isolate(), property.As<String>());
419
420
- bool has_env = !value_string.IsEmpty();
421
TraceEnvVar(env, "get", property.As<String>());
422
423
- if (has_env) {
424
- info.GetReturnValue().Set(value_string.ToLocalChecked());
425
- return Intercepted::kYes;
+ Local<Value> ret;
+ if (!value_string.ToLocal(&ret)) {
+ return Intercepted::kNo;
426
}
427
- return Intercepted::kNo;
+ info.GetReturnValue().Set(ret);
+ return Intercepted::kYes;
428
429
430
static Intercepted EnvSetter(Local<Name> property,
0 commit comments