We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
DomainToUnicode
1 parent 36dbbc7 commit d4dcab4Copy full SHA for d4dcab4
graal-nodejs/src/node_url.cc
@@ -95,6 +95,11 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) {
95
CHECK(args[0]->IsString());
96
97
std::string input = Utf8Value(env->isolate(), args[0]).ToString();
98
+ if (input.empty()) {
99
+ return args.GetReturnValue().Set(
100
+ String::NewFromUtf8(env->isolate(), "").ToLocalChecked());
101
+ }
102
+
103
// It is important to have an initial value that contains a special scheme.
104
// Since it will change the implementation of `set_hostname` according to URL
105
// spec.
0 commit comments