Skip to content

Commit

Permalink
[BUGFIX PERF] don’t rebuild a module that has already been built, bec…
Browse files Browse the repository at this point in the history
…ause that is very slow.
  • Loading branch information
stefanpenner committed Apr 18, 2016
1 parent dc8a089 commit 6ccb0a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var loader, define, requireModule, require, requirejs;
};

Module.prototype.build = function() {
if (this.state === FAILED) { return; }
if (this.state === FAILED || this.state === LOADED) { return; }
this.state = FAILED;
this.reify()
this.exports();
Expand Down

0 comments on commit 6ccb0a4

Please sign in to comment.