shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbaxte...@apache.org
Subject svn commit: r1210961 - /shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js
Date Tue, 06 Dec 2011 15:06:17 GMT
Author: rbaxter85
Date: Tue Dec  6 15:06:17 2011
New Revision: 1210961

URL: http://svn.apache.org/viewvc?rev=1210961&view=rev
Log:
SHINDIG-1666
Metadata request may not return an array of gadget URLs when there is an error it may just
return an error code and message need to account for that in EE code

Modified:
    shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js

Modified: shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js?rev=1210961&r1=1210960&r2=1210961&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js
(original)
+++ shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js
Tue Dec  6 15:06:17 2011
@@ -43,15 +43,14 @@
       var gadgetUrl = dataModel.gadget;
 
       context.preloadGadget(gadgetUrl, function(result) {
-        if (result[gadgetUrl] == null ||
-                (result[gadgetUrl] != null && result[gadgetUrl].error)) {
+        if (!result[gadgetUrl] || result[gadgetUrl].error) {
           //There was an error preloading the gadget URL lets try and render the
           //URL EE if there is one
           if (dataModel.url != null) {
             navigateUrl_(element, dataModel, renderParams, opt_callback);
           }
           else if (opt_callback != null) {
-            opt_callback(site, result[gadgetUrl]);
+            opt_callback(site, result[gadgetUrl] || {"error" : result});
           }
         }
         else {



Mime
View raw message