From c100130db3470247208560a12625fdf441011c3e 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 ef2b97322e3d2e..d9442a62b7c372 100644 --- a/lib/module.js +++ b/lib/module.js @@ -676,9 +676,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();