File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,9 @@ std::shared_ptr<KVStore> KVStore::Clone(v8::Isolate* isolate) const {
199
199
for (uint32_t i = 0 ; i < keys_length; i++) {
200
200
Local<Value> key = keys->Get (context, i).ToLocalChecked ();
201
201
CHECK (key->IsString ());
202
- copy->Set (isolate, key.As <String>(), Get (isolate, key.As <String>())
203
- .ToLocalChecked ());
202
+ copy->Set (isolate,
203
+ key.As <String>(),
204
+ Get (isolate, key.As <String>()).ToLocalChecked ());
204
205
}
205
206
return copy;
206
207
}
@@ -293,11 +294,9 @@ static void EnvGetter(Local<Name> property,
293
294
CHECK (property->IsString ());
294
295
MaybeLocal<String> value_string =
295
296
env->env_vars ()->Get (env->isolate (), property.As <String>());
296
- if (value_string.IsEmpty ()) {
297
- info.GetReturnValue ().Set (value_string.FromMaybe (Local<String>()));
298
- return ;
297
+ if (!value_string.IsEmpty ()) {
298
+ info.GetReturnValue ().Set (value_string.ToLocalChecked ());
299
299
}
300
- info.GetReturnValue ().Set (value_string.ToLocalChecked ());
301
300
}
302
301
303
302
static void EnvSetter (Local<Name> property,
You can’t perform that action at this time.
0 commit comments