Skip to content

Commit

Permalink
src: use ToLocal in node_os.cc
Browse files Browse the repository at this point in the history
PR-URL: #33939
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
wenningplus authored and jasnell committed Jun 25, 2020
1 parent 5ef5116 commit 4438852
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_os.cc
Expand Up @@ -268,10 +268,10 @@ static void GetUserInfo(const FunctionCallbackInfo<Value>& args) {
Local<Object> options = args[0].As<Object>();
MaybeLocal<Value> maybe_encoding = options->Get(env->context(),
env->encoding_string());
if (maybe_encoding.IsEmpty())
return;
Local<Value> encoding_opt;
if (!maybe_encoding.ToLocal(&encoding_opt))
return;

Local<Value> encoding_opt = maybe_encoding.ToLocalChecked();
encoding = ParseEncoding(env->isolate(), encoding_opt, UTF8);
} else {
encoding = UTF8;
Expand Down

0 comments on commit 4438852

Please sign in to comment.