babel-plugin-vasille 4.2.2 → 4.2.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.
- package/lib/jsx.js +3 -2
- package/package.json +1 -1
package/lib/jsx.js
CHANGED
|
@@ -109,10 +109,10 @@ function transformJsxArray(paths, internal) {
|
|
|
109
109
|
}
|
|
110
110
|
function statementsToFunction(arr) {
|
|
111
111
|
if (arr.length == 1 && t.isExpressionStatement(arr[0])) {
|
|
112
|
-
return t.arrowFunctionExpression([], arr[0].expression);
|
|
112
|
+
return t.arrowFunctionExpression([internal_js_1.ctx], arr[0].expression);
|
|
113
113
|
}
|
|
114
114
|
else {
|
|
115
|
-
return t.arrowFunctionExpression([], t.blockStatement(arr));
|
|
115
|
+
return t.arrowFunctionExpression([internal_js_1.ctx], t.blockStatement(arr));
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
function checkIfExpressionIsConditionalJsx(expr) {
|
|
@@ -470,6 +470,7 @@ function transformJsxElement(path, conditions, internal) {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
else if (name.name === "callback" && expressionPath && expressionPath.isExpression()) {
|
|
473
|
+
(0, mesh_js_1.meshExpression)(expressionPath, internal);
|
|
473
474
|
callback = expressionPath.node;
|
|
474
475
|
}
|
|
475
476
|
else {
|