Skip to content

Commit

Permalink
src: change String::NewFromUtf8 to FIXED_ONE_BYTE_STRING
Browse files Browse the repository at this point in the history
  • Loading branch information
pluris committed Aug 26, 2023
1 parent fee0601 commit ba00cc4
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 ba00cc4

Please sign in to comment.