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 153f292 commit b1c9f75Copy full SHA for b1c9f75
src/node_os.cc
@@ -273,10 +273,10 @@ static void GetUserInfo(const FunctionCallbackInfo<Value>& args) {
273
Local<Object> options = args[0].As<Object>();
274
MaybeLocal<Value> maybe_encoding = options->Get(env->context(),
275
env->encoding_string());
276
- if (maybe_encoding.IsEmpty())
277
- return;
+ Local<Value> encoding_opt;
+ if (!maybe_encoding.ToLocal(&encoding_opt))
278
+ return;
279
- Local<Value> encoding_opt = maybe_encoding.ToLocalChecked();
280
encoding = ParseEncoding(env->isolate(), encoding_opt, UTF8);
281
} else {
282
encoding = UTF8;
0 commit comments