@tsrx/solid 0.0.12 → 0.0.13
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/package.json +2 -2
- package/src/transform.js +8 -10
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Solid compiler built on @tsrx/core",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.13",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"esrap": "^2.1.0",
|
|
24
24
|
"zimmerframe": "^1.1.2",
|
|
25
|
-
"@tsrx/core": "0.0.
|
|
25
|
+
"@tsrx/core": "0.0.13"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"solid-js": ">=1.8 || >=2.0.0-beta"
|
package/src/transform.js
CHANGED
|
@@ -410,16 +410,14 @@ function body_to_jsx_child(body_nodes, transform_context) {
|
|
|
410
410
|
// Branch body has non-JSX statements: wrap everything in an arrow so the
|
|
411
411
|
// statements run when (and only when) the branch actually renders.
|
|
412
412
|
/** @type {any[]} */
|
|
413
|
-
const block_body = [
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
);
|
|
422
|
-
}
|
|
413
|
+
const block_body = [
|
|
414
|
+
...statements,
|
|
415
|
+
/** @type {any} */ ({
|
|
416
|
+
type: 'ReturnStatement',
|
|
417
|
+
argument: children.length > 0 ? build_return_expression(children) : create_null_literal(),
|
|
418
|
+
metadata: { path: [] },
|
|
419
|
+
}),
|
|
420
|
+
];
|
|
423
421
|
|
|
424
422
|
return /** @type {any} */ ({
|
|
425
423
|
type: 'ArrowFunctionExpression',
|