babel-plugin-vasille 5.0.2 → 5.0.3

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.
@@ -263,12 +263,14 @@ function transformProgram(path, filename, opts) {
263
263
  fn.body = t.blockStatement([
264
264
  t.returnStatement(call("runFn", [
265
265
  t.arrowFunctionExpression(params, body, fn.async),
266
- args,
266
+ fn.params.length > 0 ? args : t.arrayExpression(),
267
267
  nodeToStaticPosition(fn),
268
268
  getInspector(),
269
269
  ])),
270
270
  ]);
271
- fn.params = [t.restElement(args)];
271
+ if (fn.params.length > 0) {
272
+ fn.params = [t.restElement(args)];
273
+ }
272
274
  }
273
275
  },
274
276
  wrapFunction(fn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-plugin-vasille",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Convert Vasille Meta Language code to pure JavaScript",
5
5
  "main": "lib/index.js",
6
6
  "type": "commonjs",