babel-plugin-react-turbo
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -25,5 +25,7 @@ import * as t from '@babel/types'; | ||
t.returnStatement(t.callExpression(t.identifier(returnedId), [ | ||
t.arrowFunctionExpression([renderReturnName], t.callExpression(t.identifier(renderId), [renderReturnName])), | ||
t.arrowFunctionExpression([renderReturnName], hasReturn | ||
? t.callExpression(t.identifier(renderId), [renderReturnName]) | ||
: t.blockStatement([])), | ||
])), | ||
]; | ||
} |
{ | ||
"name": "babel-plugin-react-turbo", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "Babel plugin for react-turbo", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -53,3 +53,5 @@ import type { NodePath } from '@babel/traverse'; | ||
[renderReturnName], | ||
t.callExpression(t.identifier(renderId), [renderReturnName]), | ||
hasReturn | ||
? t.callExpression(t.identifier(renderId), [renderReturnName]) | ||
: t.blockStatement([]), | ||
), | ||
@@ -56,0 +58,0 @@ ]), |
92196
2500