From 48f4667205a21c52ffe8147b0255be3cf37d6dce Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 9 Sep 2015 15:25:52 -0700 Subject: [PATCH] tweak(react-remote): If window is closed very quickly, do not send sizing (Sentry 2888) --- src/react-remote/react-remote-parent.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/react-remote/react-remote-parent.js b/src/react-remote/react-remote-parent.js index 1246f754f..b96da3d8e 100644 --- a/src/react-remote/react-remote-parent.js +++ b/src/react-remote/react-remote-parent.js @@ -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();