From 6ccb0a45db2e5d436281209cb1240aa144e3413c Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Sun, 17 Apr 2016 17:16:38 -0700 Subject: [PATCH] =?UTF-8?q?[BUGFIX=20PERF]=20don=E2=80=99t=20rebuild=20a?= =?UTF-8?q?=20module=20that=20has=20already=20been=20built,=20because=20th?= =?UTF-8?q?at=20is=20very=20slow.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/loader/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/loader/loader.js b/lib/loader/loader.js index ab25e53..574f862 100644 --- a/lib/loader/loader.js +++ b/lib/loader/loader.js @@ -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();