From 7e230727fcb35616415badf0f8e1c9729ba0f61d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 27 Feb 2017 09:33:07 -0800 Subject: [PATCH] module: avoid using forEach PR-URL: https://github.com/nodejs/node/pull/11582 Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig --- lib/module.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/module.js b/lib/module.js index 0c66d3390d222c..d485c7c9a804a3 100644 --- a/lib/module.js +++ b/lib/module.js @@ -661,9 +661,8 @@ Module._preloadModules = function(requests) { throw e; } } - requests.forEach(function(request) { - parent.require(request); - }); + for (var n = 0; n < requests.length; n++) + parent.require(requests[n]); }; Module._initPaths();