From ae033c5e1ef83065f624f8229ae151e27296edfb Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Sun, 26 Sep 2021 14:10:29 -0400 Subject: [PATCH] Manual touch ups A few manual changes I made after the codemod ran. --- packages/react-art/src/ReactARTHostConfig.js | 2 -- packages/react-dom/src/client/ReactDOMTextarea.js | 2 -- .../src/server/ReactDOMServerFormatConfig.js | 2 -- .../react-dom/src/server/ReactPartialRenderer.js | 4 ---- .../src/server/ReactPartialRendererHooks.js | 2 -- .../react-dom/src/server/ReactThreadIDAllocator.js | 2 -- .../Libraries/ReactPrivate/UIManager.js | 4 ---- .../src/legacy-events/EventPluginRegistry.js | 2 -- .../react-reconciler/src/ReactChildFiber.new.js | 6 ++++-- .../react-reconciler/src/ReactChildFiber.old.js | 6 ++++-- .../react-reconciler/src/ReactFiberHooks.new.js | 2 -- .../react-reconciler/src/ReactFiberHooks.old.js | 2 -- .../src/ReactFiberReconciler.new.js | 10 ++++------ .../src/ReactFiberReconciler.old.js | 10 ++++------ .../react-reconciler/src/ReactTestSelectors.js | 14 ++------------ packages/react-server/src/ReactFizzHooks.js | 2 -- scripts/error-codes/codes.json | 2 +- 17 files changed, 19 insertions(+), 55 deletions(-) diff --git a/packages/react-art/src/ReactARTHostConfig.js b/packages/react-art/src/ReactARTHostConfig.js index 436bdc50859b8..48e4d9c102649 100644 --- a/packages/react-art/src/ReactARTHostConfig.js +++ b/packages/react-art/src/ReactARTHostConfig.js @@ -248,8 +248,6 @@ export function appendInitialChild(parentInstance, child) { if (typeof child === 'string') { // Noop for string children of Text (eg {'foo'}{'bar'}) throw new Error('Text children should already be flattened.'); - - return; } child.inject(parentInstance); diff --git a/packages/react-dom/src/client/ReactDOMTextarea.js b/packages/react-dom/src/client/ReactDOMTextarea.js index b98ec8d55b7cf..6834b16e4e97c 100644 --- a/packages/react-dom/src/client/ReactDOMTextarea.js +++ b/packages/react-dom/src/client/ReactDOMTextarea.js @@ -104,8 +104,6 @@ export function initWrapperState(element: Element, props: Object) { } if (isArray(children)) { - // FIXME: Review this condition before merging - // Should be equivalent to: !(children.length <= 1) if (children.length > 1) { throw new Error('