Skip to content

Commit

Permalink
Merge pull request #12603 from stefanpenner/pre-alloc
Browse files Browse the repository at this point in the history
[Fixes #12586] pre-alloc array
  • Loading branch information
stefanpenner committed Nov 15, 2015
2 parents 0810d91 + c0f2eaf commit c772c60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/loader/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ var mainContext = this;
var mod = registry[name];
var deps = mod.deps;
var callback = mod.callback;
var reified = [];
var length = deps.length;
var reified = new Array(length);;

for (var i = 0; i < length; i++) {
if (deps[i] === 'exports') {
reified.push(exports);
reified[i] = exports;
} else {
reified.push(internalRequire(deps[i], name));
reified[i] = internalRequire(deps[i], name);
}
}

Expand Down

0 comments on commit c772c60

Please sign in to comment.