From 96b72d094331f81af16328789489b6cb5fb183ce Mon Sep 17 00:00:00 2001 From: Nathan Hunzaker Date: Sun, 20 Nov 2016 16:47:47 -0500 Subject: [PATCH] Migrate over rules for DOM Fiber. Update tests --- scripts/fiber/tests-passing-except-dev.txt | 2 -- src/renderers/dom/fiber/ReactDOMFiberComponent.js | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/fiber/tests-passing-except-dev.txt b/scripts/fiber/tests-passing-except-dev.txt index f6b4477bb0823..cbe5f0aafb452 100644 --- a/scripts/fiber/tests-passing-except-dev.txt +++ b/scripts/fiber/tests-passing-except-dev.txt @@ -24,8 +24,6 @@ src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js * should warn about style containing a NaN value src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js -* should warn for unknown prop -* should group multiple unknown prop warnings together * should warn for onDblClick prop * should emit a warning once for a named custom component using shady DOM * should not warn when server-side rendering `onScroll` diff --git a/src/renderers/dom/fiber/ReactDOMFiberComponent.js b/src/renderers/dom/fiber/ReactDOMFiberComponent.js index a5162240315a6..390e2c6e7e15b 100644 --- a/src/renderers/dom/fiber/ReactDOMFiberComponent.js +++ b/src/renderers/dom/fiber/ReactDOMFiberComponent.js @@ -343,9 +343,7 @@ function updateDOMProperties( domElement, propKey ); - } else if ( - DOMProperty.properties[propKey] || - DOMProperty.isCustomAttribute(propKey)) { + } else { DOMPropertyOperations.deleteValueForProperty(domElement, propKey); } } @@ -420,9 +418,7 @@ function updateDOMProperties( propKey, nextProp ); - } else if ( - DOMProperty.properties[propKey] || - DOMProperty.isCustomAttribute(propKey)) { + } else { // If we're updating to null or undefined, we should remove the property // from the DOM node instead of inadvertently setting to a string. This // brings us in line with the same behavior we have on initial render.