File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ void URLPattern::New(const FunctionCallbackInfo<Value>& args) {
168168 // If init does not have a value here, the implication is that an
169169 // error was thrown. Let's allow that to be handled now by returning
170170 // early. If we don't, the error thrown will be swallowed.
171- if (!init. has_value () ) return ;
171+ if (!init) return ;
172172 } else {
173173 THROW_ERR_INVALID_ARG_TYPE (env, " Input must be an object or a string" );
174174 return ;
@@ -244,7 +244,7 @@ MaybeLocal<Value> URLPattern::URLPatternInit::ToJsObject(
244244 auto result = Object::New (isolate);
245245
246246 const auto trySet = [&](auto name, const std::optional<std::string>& val) {
247- if (!val. has_value () ) return true ;
247+ if (!val) return true ;
248248 Local<Value> temp;
249249 return ToV8Value (context, *val).ToLocal (&temp) &&
250250 result->Set (context, name, temp).IsJust ();
You can’t perform that action at this time.
0 commit comments