diff --git a/scripts/fiber/tests-failing.txt b/scripts/fiber/tests-failing.txt index 46e114bb24..ae1b00f2df 100644 --- a/scripts/fiber/tests-failing.txt +++ b/scripts/fiber/tests-failing.txt @@ -26,7 +26,6 @@ src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js * can reconcile text arbitrarily split into multiple nodes on some substitutions only src/renderers/dom/shared/__tests__/ReactMount-test.js -* throws when given a non-node * throws when given a string * throws when given a factory * tracks root instances diff --git a/scripts/fiber/tests-passing.txt b/scripts/fiber/tests-passing.txt index 495ab14b83..ab34e72691 100644 --- a/scripts/fiber/tests-passing.txt +++ b/scripts/fiber/tests-passing.txt @@ -752,6 +752,7 @@ src/renderers/dom/shared/__tests__/ReactEventListener-test.js * should not fire duplicate events for a React DOM tree src/renderers/dom/shared/__tests__/ReactMount-test.js +* throws when given a non-node * should render different components in same root * should unmount and remount if the key changes * should reuse markup if rendering to the same target twice diff --git a/src/renderers/dom/fiber/ReactDOMFiber.js b/src/renderers/dom/fiber/ReactDOMFiber.js index ed27da5ee9..79ad9a28de 100644 --- a/src/renderers/dom/fiber/ReactDOMFiber.js +++ b/src/renderers/dom/fiber/ReactDOMFiber.js @@ -352,6 +352,10 @@ var ReactDOM = { }, unmountComponentAtNode(container : DOMContainerElement) { + invariant( + isValidContainer(container), + 'unmountComponentAtNode(...): Target container is not a DOM element.' + ); warnAboutUnstableUse(); if (container._reactRootContainer) { // Unmount should not be batched.