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 12, 2023
1 parent 78b721d commit 4e380fd
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 4e380fd

Please sign in to comment.