From fd3252ef580a8bd4013217bff9b144069e8f917f Mon Sep 17 00:00:00 2001 From: Keyhan Vakil Date: Tue, 14 Mar 2023 06:12:00 +0000 Subject: [PATCH] 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 --- src/node_builtins.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 0439fff5115bd9..073a29dd7ff24b 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -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,