cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: Fix tests broken by lazy module requiring.
Date Thu, 12 Sep 2013 15:47:40 GMT
Updated Branches:
  refs/heads/master 2d4ab6cf5 -> 7bd026649


Fix tests broken by lazy module requiring.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/7bd02664
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/7bd02664
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/7bd02664

Branch: refs/heads/master
Commit: 7bd0266494e41ba2bb41bddfe8efdccf9872835a
Parents: 2d4ab6c
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Sep 12 11:47:04 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Sep 12 11:47:04 2013 -0400

----------------------------------------------------------------------
 plugman.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7bd02664/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index 240e0db..625933d 100755
--- a/plugman.js
+++ b/plugman.js
@@ -22,8 +22,11 @@
 var emitter = require('./src/events');
 
 function addProperty(o, symbol, modulePath) {
+    var val = null;
     Object.defineProperty(o, symbol, {
-        get : function() { return require(modulePath); }});
+        get : function() { return val = val || require(modulePath); },
+        set : function(v) { val = v; }
+    });
 }
 
 plugman = {


Mime
View raw message