Bug 813789 - avoid console errors about _dynamicResizer being null. r=jaws

This commit is contained in:
Mark Hammond 2012-11-27 17:56:22 +11:00
parent 3adc3b27f8
commit 2dc7eec033

View File

@ -396,8 +396,10 @@ let SocialFlyout = {
iframe.addEventListener("load", function panelBrowserOnload(e) {
iframe.removeEventListener("load", panelBrowserOnload, true);
setTimeout(function() {
SocialFlyout._dynamicResizer.start(panel, iframe);
SocialFlyout.dispatchPanelEvent("socialFrameShow");
if (SocialFlyout._dynamicResizer) { // may go null if hidden quickly
SocialFlyout._dynamicResizer.start(panel, iframe);
SocialFlyout.dispatchPanelEvent("socialFrameShow");
}
}, 0);
}, true);
}