From 678cb70da2750988dd048cb63aa8d94269b387d0 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 6 Mar 2017 14:58:29 -0800 Subject: [PATCH] Fix radio buttons using stale props in Fiber (#9126) D4662269 --- src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js b/src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js index 36be73bac9..d9e2467a9c 100644 --- a/src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js +++ b/src/renderers/dom/fiber/wrappers/ReactDOMFiberInput.js @@ -292,16 +292,16 @@ function updateNamedCousins(rootNode, props) { // and the same name are rendered into the same form (same as #1939). // That's probably okay; we don't support it just as we don't support // mixing React radio buttons with non-React ones. - var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + var otherProps = ReactDOMComponentTree.getFiberCurrentPropsFromNode(otherNode); invariant( - otherInstance, + otherProps, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.' ); // If this is a controlled radio button group, forcing the input that // was previously checked to update will cause it to be come re-checked // as appropriate. - ReactDOMInput.updateWrapper(otherNode, otherInstance.memoizedProps); + ReactDOMInput.updateWrapper(otherNode, otherProps); } } }