Skip to content

Commit

Permalink
fixup! src: add a condition if the argument of DomainToUnicode is e…
Browse files Browse the repository at this point in the history
…mpty
  • Loading branch information
pluris committed Aug 11, 2023
1 parent 9870c88 commit e2fd13c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) {

std::string input = Utf8Value(env->isolate(), args[0]).ToString();
if (input.empty()) {
return args.GetReturnValue().Set(
String::NewFromUtf8(env->isolate(), "").ToLocalChecked());
return args.GetReturnValue().Set(FIXED_ONE_BYTE_STRING(env->isolate(), ""));
}

// It is important to have an initial value that contains a special scheme.
Expand Down

0 comments on commit e2fd13c

Please sign in to comment.