8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
There was a 8000 n error while loading. Please reload this page.
DomainToUnicode
1 parent a6cfea3 commit 4a9ae31Copy full SHA for 4a9ae31
src/node_url.cc
@@ -100,6 +100,11 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) {
100
CHECK(args[0]->IsString());
101
102
std::string input = Utf8Value(env->isolate(), args[0]).ToString();
103
+ if (input.empty()) {
104
+ return args.GetReturnValue().Set(
105
+ String::NewFromUtf8(env->isolate(), "").ToLocalChecked());
106
+ }
107
+
108
// It is important to have an initial value that contains a special scheme.
109
// Since it will change the implementation of `set_hostname` according to URL
110
// spec.
0 commit comments