You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by mh...@apache.org on 2011/04/28 01:15:24 UTC
svn commit: r1097279 - in
/shindig/trunk/features/src/main/javascript/features: exportjs/exportjs.js
rpc/rpc.js
Author: mhermanto
Date: Wed Apr 27 23:15:24 2011
New Revision: 1097279
URL: http://svn.apache.org/viewvc?rev=1097279&view=rev
Log:
- exportjs now no longer stomps on declared symbols
- gadgets.rpc guard code now properly avoids double-declaration.
Modified:
shindig/trunk/features/src/main/javascript/features/exportjs/exportjs.js
shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified: shindig/trunk/features/src/main/javascript/features/exportjs/exportjs.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/exportjs/exportjs.js?rev=1097279&r1=1097278&r2=1097279&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/exportjs/exportjs.js (original)
+++ shindig/trunk/features/src/main/javascript/features/exportjs/exportjs.js Wed Apr 27 23:15:24 2011
@@ -53,7 +53,7 @@ function exportJs(namespace, components,
var nsParts = namespace.split('.');
for (var i = 0, part; part = nsParts.shift(); i++) {
- base[part] = components[i] || {};
+ base[part] = base[part] || components[i] || {};
prevBase = base;
base = base[part];
}
@@ -62,7 +62,7 @@ function exportJs(namespace, components,
var props = opt_props || {};
for (var prop in props) {
if (props.hasOwnProperty(prop) && root.hasOwnProperty(prop)) {
- root[props[prop]] = root[prop];
+ if (!root[props[prop]]) root[props[prop]] = root[prop];
}
}
};
Modified: shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=1097279&r1=1097278&r2=1097279&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Wed Apr 27 23:15:24 2011
@@ -52,7 +52,7 @@
* true if successful, false otherwise.
*/
-if (!gadgets.rpc) { // make lib resilient to double-inclusion
+if (!window['gadgets']['rpc']) { // make lib resilient to double-inclusion
/**
* @static