Skip to content

Commit

Permalink
SHINDIG-1994 | The activeSiteHolder is undefined if called too soon a…
Browse files Browse the repository at this point in the history
…fter navigateGadget | Patch by Doug Davies. Thanks!

git-svn-id: https://svn.apache.org/repos/asf/shindig/trunk@1678514 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Stanton Sievers committed May 9, 2015
1 parent 0e6e149 commit 5975aba
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,14 @@ osapi.container.GadgetSite.prototype.navigateTo = function(

message = ['Detailed error: ', gadgetInfo.error.code || '', ' ', gadgetInfo.error.message || ''].join('');
gadgets.log(message);
callback(gadgetInfo);
} else {
var moduleId = renderParams[osapi.container.RenderParam.MODULE_ID] || 0;
self.setModuleId_(gadgetUrl, moduleId, function() {
self.container_.applyLifecycleCallbacks_(osapi.container.CallbackType.ON_BEFORE_RENDER,
gadgetInfo);
self.render(gadgetInfo, viewParams, renderParams);
callback(gadgetInfo);
});
}

Expand All @@ -206,8 +208,6 @@ osapi.container.GadgetSite.prototype.navigateTo = function(
timingInfo[osapi.container.NavigateTiming.XRT] = xrt;
self.onNavigateTo(timingInfo);

// Possibly with an error. Leave to user to deal with raw response.
callback(gadgetInfo);
});
};

Expand Down

0 comments on commit 5975aba

Please sign in to comment.