Skip to content

Commit

Permalink
fix match
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Jan 3, 2025
1 parent 603a619 commit 8a44b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/url_pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,9 @@ result<std::optional<url_pattern_result>> url_pattern::match(
std::get<url_pattern_init>(input), "url", protocol, username, password,
hostname, port, pathname, search, hash);

// If this throws an exception, catch it, and return null.
if (!apply_result.has_value()) {
return tl::unexpected(apply_result.error());
return std::nullopt;
}

// Set protocol to applyResult["protocol"].
Expand Down

0 comments on commit 8a44b81

Please sign in to comment.