Skip to content

Commit

Permalink
fix: head transformer append scripts inside for Marko 5
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jul 6, 2020
1 parent ed85dd3 commit cd66494
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/loader/head-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ function transformerMarko5(path, t): void {
t.identifier("out"),
t.identifier("___renderAssets")
);
path.replaceWith(
t.markoScriptlet([
t.expressionStatement(
t.logicalExpression(
"&&",
renderAssetsMember,
t.callExpression(renderAssetsMember, [])
path
.get("body")
.pushContainer(
"body",
t.markoScriptlet([
t.expressionStatement(
t.logicalExpression(
"&&",
renderAssetsMember,
t.callExpression(renderAssetsMember, [])
)
)
)
])
);
])
);
}

0 comments on commit cd66494

Please sign in to comment.