We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29b2b9d commit e1d6c9aCopy full SHA for e1d6c9a
client/overlay/index.js
@@ -240,7 +240,12 @@ function render() {
240
*/
241
function cleanup() {
242
// Clean up and reset all internal state.
243
- document.body.removeChild(iframeRoot);
+ try {
244
+ document.body.removeChild(iframeRoot);
245
+ } catch (e) {
246
+ // In case user render react app directly to body, will trigger `NotFoundError`
247
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild#exceptions
248
+ }
249
scheduledRenderFn = null;
250
root = null;
251
iframeRoot = null;
0 commit comments