----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3005/#review3618 -----------------------------------------------------------
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js <https://reviews.apache.org/r/3005/#comment8078> This looks a bit cluttered to me. What about: context.preloadGadget(gadgetUrl, function(result) { 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) { // Sometimes the metadata request will return an error code and message without // specifying the gadgets the request is for, in this case format the object the // way we would expect it opt_callback(site, result[gadgetUrl] || {error: result}); } } else { context.navigateGadget(site, gadgetUrl, viewParams, localRenderParams, function(metadata) { if (opt_callback != null) { opt_callback(site, metadata); } }); } }); - Dan On 2011-12-04 19:53:37, Ryan Baxter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/3005/ > ----------------------------------------------------------- > > (Updated 2011-12-04 19:53:37) > > > Review request for shindig and Stanton Sievers. > > > Summary > ------- > > When preloading a gadget the response usually is an array of gadget URLs with > data about the gadget. However sometimes the response may actually just be an > error code and message. We need to account for that case in the handler in > the EE code. > > > This addresses bug SHINDIG-1666. > https://issues.apache.org/jira/browse/SHINDIG-1666 > > > Diffs > ----- > > > http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/embeddedexperiences/embedded_experiences_container.js > 1210178 > > Diff: https://reviews.apache.org/r/3005/diff > > > Testing > ------- > > Ran unit tests and common container > > > Thanks, > > Ryan > >
