| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,6 +95,11 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) { | |||
| 95 | 95 | CHECK(args[0]->IsString()); | |
| 96 | 96 | ||
| 97 | 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 | + | ||
| 98 | 103 | // It is important to have an initial value that contains a special scheme. | |
| 99 | 104 | // Since it will change the implementation of `set_hostname` according to URL | |
| 100 | 105 | // spec. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments