Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 350f62d

Browse filesBrowse files
danielmbrasiladuh95
authored andcommitted
src: fix ThrowInvalidURL call in PathToFileURL
Replace `nullptr` with `std::nullopt` when calling `ThrowInvalidURL` in `PathToFileURL`. This ensures the function receives the correct argument type and aligns with the expected behavior. PR-URL: #57141 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me>
1 parent a089810 commit 350f62d
Copy full SHA for 350f62d

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/node_url.cc‎

Copy file name to clipboardExpand all lines: src/node_url.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void BindingData::PathToFileURL(const FunctionCallbackInfo<Value>& args) {
161161
ada::parse<ada::url_aggregator>(EncodePathChars(input_str, os), nullptr);
162162

163163
if (!out) {
164-
return ThrowInvalidURL(realm->env(), input.ToStringView(), nullptr);
164+
return ThrowInvalidURL(realm->env(), input.ToStringView(), std::nullopt);
165165
}
166166

167167
if (os == OS::WINDOWS && args.Length() > 2 && !args[2]->IsUndefined())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.