From 1447508e58060942e2224c623b40765b12933e78 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Sun, 12 Aug 2018 00:33:50 +0100 Subject: [PATCH 1/4] Warn when the string "false" is the value of a boolean DOM prop --- .../src/__tests__/ReactDOMComponent-test.js | 26 +++++++++++++++++++ .../src/shared/ReactDOMUnknownPropertyHook.js | 20 ++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js index 642c5834c881b..f712a695d7abb 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js @@ -2506,6 +2506,32 @@ describe('ReactDOMComponent', () => { }); }); + describe('Boolean attributes', function() { + it('warns on the ambiguous string value "false"', function() { + let el; + expect(() => { + el = ReactTestUtils.renderIntoDocument(