You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/09/12 17:47:40 UTC

git commit: Fix tests broken by lazy module requiring.

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 <ag...@chromium.org>
Authored: Thu Sep 12 11:47:04 2013 -0400
Committer: Andrew Grieve <ag...@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 = {