Skip to content

Commit e2fd13c

Browse files
author
pluris
committed
fixup! src: add a condition if the argument of DomainToUnicode is empty
1 parent 9870c88 commit e2fd13c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node_url.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) {
101101

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

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

0 commit comments

Comments
 (0)