From dbc07220ae9188a3fb2bdea3d826ff7f48532a2e Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Sat, 17 Dec 2016 20:50:03 -0800 Subject: [PATCH] Revert babel-helper-builder-react-jsx change from #4988 --- packages/babel-helper-builder-react-jsx/src/index.js | 4 ---- .../fixtures/react/should-disallow-spread-children/actual.js | 1 - .../react/should-disallow-spread-children/options.json | 3 --- 3 files changed, 8 deletions(-) delete mode 100644 packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/actual.js delete mode 100644 packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json diff --git a/packages/babel-helper-builder-react-jsx/src/index.js b/packages/babel-helper-builder-react-jsx/src/index.js index 22f963e342..2438070df0 100644 --- a/packages/babel-helper-builder-react-jsx/src/index.js +++ b/packages/babel-helper-builder-react-jsx/src/index.js @@ -17,10 +17,6 @@ export default function (opts) { throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML."); }; - visitor.JSXSpreadChild = function(path) { - throw path.buildCodeFrameError("Spread children are not supported."); - }; - visitor.JSXElement = { exit(path, file) { let callExpr = buildElementCall(path.get("openingElement"), file); diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/actual.js b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/actual.js deleted file mode 100644 index 6a05e108dc..0000000000 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/actual.js +++ /dev/null @@ -1 +0,0 @@ -
{...children}
; diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json deleted file mode 100644 index ec71024507..0000000000 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Spread children are not supported." -}