marko 6.0.62 → 6.0.63

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.
@@ -9801,12 +9801,14 @@ var script_default = {
9801
9801
  const start = body[0]?.start;
9802
9802
  const end = body[body.length - 1]?.end;
9803
9803
  const bodyStatements = (0, import_babel_utils41.parseStatements)(tag.hub.file, code, start, end);
9804
- const valueFn = import_compiler47.types.arrowFunctionExpression(
9805
- [],
9806
- import_compiler47.types.blockStatement(bodyStatements),
9807
- traverseContains(bodyStatements, isAwaitExpression)
9808
- );
9809
- node.attributes.push(import_compiler47.types.markoAttribute("value", valueFn));
9804
+ if (bodyStatements.length) {
9805
+ const valueFn = import_compiler47.types.arrowFunctionExpression(
9806
+ [],
9807
+ import_compiler47.types.blockStatement(bodyStatements),
9808
+ traverseContains(bodyStatements, isAwaitExpression)
9809
+ );
9810
+ node.attributes.push(import_compiler47.types.markoAttribute("value", valueFn));
9811
+ }
9810
9812
  node.body.body = [];
9811
9813
  }
9812
9814
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.62",
3
+ "version": "6.0.63",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",