Author: johnh
Date: Thu Jun 18 19:49:19 2009
New Revision: 786228
URL: http://svn.apache.org/viewvc?rev=786228&view=rev
Log:
Avoid exception in wpm and other places which use gadgets.rpc.getRelayUrl(...)
when relayURL isn't set for the target.
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=786228&r1=786227&r2=786228&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
(original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Thu Jun 18 19:49:19 2009
@@ -884,7 +884,7 @@
getRelayUrl: function(targetId) {
var url = relayUrl[targetId];
// Some RPC methods (wpm, for one) are unhappy with schemeless URLs.
- if (url.indexOf('//') == 0) {
+ if (url && url.indexOf('//') == 0) {
url = document.location.protocol + url;
}