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 9bf1443

Browse filesBrowse files
anonrigRafaelGSS
authored andcommitted
src: omit bool values of package.json main field
PR-URL: #50965 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 9f54987 commit 9bf1443
Copy full SHA for 9bf1443

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-3
lines changed
Open diff view settings
Collapse file

‎src/node_modules.cc‎

Copy file name to clipboardExpand all lines: src/node_modules.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ const BindingData::PackageConfig* BindingData::GetPackageJSON(
160160
return throw_invalid_package_config();
161161
}
162162
} else if (key == "main") {
163-
if (value.get_string(package_config.main)) {
164-
return throw_invalid_package_config();
165-
}
163+
// Omit all non-string values
164+
USE(value.get_string(package_config.main));
166165
} else if (key == "exports") {
167166
if (value.type().get(field_type)) {
168167
return throw_invalid_package_config();

0 commit comments

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