Skip to content

Commit

Permalink
src: fix duplication of externalized builtin code
Browse files Browse the repository at this point in the history
The `else` here was missing, causing us to append the file to its
existing `source` already in the map.

Refs: nodejs#45942
PR-URL: nodejs#47079
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
kvakil authored Mar 17, 2023
1 parent d51541b commit c3537ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
auto it = externalized_builtin_sources.find(id);
if (it != externalized_builtin_sources.end()) {
source = it->second;
}
{
} else {
int r = ReadFileSync(&source, filename);
if (r != 0) {
fprintf(stderr,
Expand Down

0 comments on commit c3537ae

Please sign in to comment.