src: fix duplication of externalized builtin code

The `else` here was missing, causing us to append the file to its
existing `source` already in the map.

Refs: https://github.com/nodejs/node/pull/45942
PR-URL: https://github.com/nodejs/node/pull/47079
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Keyhan Vakil authored and GitHub committed 2023-03-17 00:20:22 +00:00
1 parent d51541b720
commit c3537ae8cc
1 file changed
+1 -2
+1 -2
View File
@@ -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,