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.
1 parent 5ed8d3d commit 00f904fCopy full SHA for 00f904f
src/node_url_pattern.cc
@@ -367,12 +367,8 @@ MaybeLocal<Object> URLPattern::URLPatternComponentResult::ToJSObject(
367
auto context = env->context();
368
auto parsed_group = Object::New(isolate);
369
for (const auto& [group_key, group_value] : result.groups) {
370
- Local<String> key;
371
- if (!String::NewFromUtf8(isolate,
372
- group_key.c_str(),
373
- NewStringType::kNormal,
374
- group_key.size())
375
- .ToLocal(&key)) {
+ Local<Value> key;
+ if (!ToV8Value(context, group_key).ToLocal(&key)) {
376
return {};
377
}
378
Local<Value> value;
0 commit comments