Skip to content

Commit c100130

Browse files
jasnelljungx098
authored andcommitted
module: avoid using forEach
PR-URL: nodejs#11582 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 65e66a3 commit c100130

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/module.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,9 +676,8 @@ Module._preloadModules = function(requests) {
676676
throw e;
677677
}
678678
}
679-
requests.forEach(function(request) {
680-
parent.require(request);
681-
});
679+
for (var n = 0; n < requests.length; n++)
680+
parent.require(requests[n]);
682681
};
683682

684683
Module._initPaths();

0 commit comments

Comments
 (0)