Skip to content

Commit

Permalink
src: omit bool values of package.json main field
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Nov 29, 2023
1 parent 59f57d2 commit 61523db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_modules.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ const BindingData::PackageConfig* BindingData::GetPackageJSON(
return throw_invalid_package_config();
}
} else if (key == "main") {
if (value.get_string(package_config.main)) {
return throw_invalid_package_config();
}
// Omit all non-string values
USE(value.get_string(package_config.main));
break;
} else if (key == "exports") {
if (value.type().get(field_type)) {
return throw_invalid_package_config();
Expand Down

0 comments on commit 61523db

Please sign in to comment.