Skip to content

Commit 534b137

Browse files
committed
AEDebugging_ Fix missing parameters to super constructor
SQUASHED: AUTO-COMMIT-src-client-reactive-babel-plugin-active-expression-rewriting-index.js,AUTO-COMMIT-src-client-reactive-components-rewritten-aexpr-test-component.js,
1 parent 3cb8999 commit 534b137

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/client/reactive/babel-plugin-active-expression-rewriting/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,10 @@ export default function(babel) {
466466
// No constructor exists -> Override default constructor
467467
const constructorContent = [];
468468
if(path.node.superClass) {
469-
constructorContent.push(t.expressionStatement(t.callExpression(t.super(), [])));
469+
constructorContent.push(t.expressionStatement(t.callExpression(t.super(), [t.spreadElement(t.identifier("args"))])));
470470
}
471471
constructorContent.push(setClassFilePathStatement());
472-
path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), [], t.blockStatement(constructorContent)));
472+
path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), [t.restElement(t.identifier("args"))], t.blockStatement(constructorContent)));
473473
}
474474
},
475475
/*MD # Identifier MD*/

src/client/reactive/components/rewritten/aexpr-test-component.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default class AexprTest extends Morph {
4848
return this.get("#delete");
4949
}
5050

51-
async livelyExample() {}
51+
async livelyExample() {
52+
}
5253

5354
}

0 commit comments

Comments
 (0)