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 codebytere committed Jul 12, 2020
1 parent 153f292 commit b1c9f75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,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 b1c9f75

Please sign in to comment.