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.
1 parent 9a52cd9 commit c492a27Copy full SHA for c492a27
src/node_os.cc
@@ -268,10 +268,10 @@ static void GetUserInfo(const FunctionCallbackInfo<Value>& args) {
268
Local<Object> options = args[0].As<Object>();
269
MaybeLocal<Value> maybe_encoding = options->Get(env->context(),
270
env->encoding_string());
271
- if (maybe_encoding.IsEmpty())
272
- return;
+ Local<Value> encoding_opt;
+ if (!maybe_encoding.ToLocal(&encoding_opt))
273
+ return;
274
- Local<Value> encoding_opt = maybe_encoding.ToLocalChecked();
275
encoding = ParseEncoding(env->isolate(), encoding_opt, UTF8);
276
} else {
277
encoding = UTF8;
0 commit comments