tweak(react-remote): If window is closed very quickly, do not send sizing (Sentry 2888)

This commit is contained in:
Ben Gotow 2015-09-09 15:25:52 -07:00
parent 97442b9bcb
commit ac9a86e6f3

View file

@ -250,6 +250,8 @@ var openWindowForComponent = function(Component, options) {
}
for (var ii = 0; ii < invocationTargets.length; ii++) {
if (invocationTargets[ii].container === container) {
invocationTargets[ii].windowReady = false
invocationTargets[ii].window = null
invocationTargets.splice(ii, 1);
break;
}
@ -266,6 +268,9 @@ var openWindowForComponent = function(Component, options) {
if (!options.autosize) {
return;
}
if (!thinWindow) {
return;
}
// Weirdly, this returns an array of [width, height] and not a hash
var size = thinWindow.getContentSize();
var containerSize = container.getBoundingClientRect();