babel-plugin-jsx-dom-expressions 0.35.3 → 0.35.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2196,10 +2196,10 @@ function createElement(path, { topLevel, hydratable }) {
2196
2196
  if (v.length) memo.push(t__namespace.stringLiteral(v));
2197
2197
  } else {
2198
2198
  const child = transformNode(path);
2199
- if (markers && child.exprs.length) memo.push(t__namespace.stringLiteral("<!--#-->"));
2199
+ if (markers && child.exprs.length && !child.spreadElement) memo.push(t__namespace.stringLiteral("<!--#-->"));
2200
2200
  if (child.exprs.length && !child.spreadElement) child.exprs[0] = escapeExpression(path, child.exprs[0]);
2201
2201
  memo.push(getCreateTemplate(config, path, child)(path, child, true));
2202
- if (markers && child.exprs.length) memo.push(t__namespace.stringLiteral("<!--/-->"));
2202
+ if (markers && child.exprs.length && !child.spreadElement) memo.push(t__namespace.stringLiteral("<!--/-->"));
2203
2203
  }
2204
2204
  return memo;
2205
2205
  }, []);
@@ -2890,9 +2890,9 @@ function transformComponent(path) {
2890
2890
  if (childResult && childResult[0]) {
2891
2891
  if (childResult[1]) {
2892
2892
  const body =
2893
- t__namespace.isCallExpression(childResult[0]) && t__namespace.isFunction(childResult[0].callee)
2894
- ? childResult[0].callee.body
2895
- : childResult[0].body;
2893
+ t__namespace.isCallExpression(childResult[0]) && t__namespace.isFunction(childResult[0].arguments[0])
2894
+ ? childResult[0].arguments[0].body
2895
+ : childResult[0].body ? childResult[0].body : childResult[0];
2896
2896
  runningObject.push(
2897
2897
  t__namespace.objectMethod(
2898
2898
  "get",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "babel-plugin-jsx-dom-expressions",
3
3
  "description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
4
- "version": "0.35.3",
4
+ "version": "0.35.4",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "@babel/core": "^7.0.0"
29
29
  },
30
- "gitHead": "264fdaf1327aef901de0a35768d5d7e0ad44f6e3"
30
+ "gitHead": "dcc322b7f4bf7d651196b99504b2d17bb80f1973"
31
31
  }