Apply suggestions from code review

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/16780/head
Elliott Johnson 4 weeks ago committed by GitHub
parent ba391448eb
commit 3b99bdbfdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,10 +16,10 @@ export function IfBlock(node, context) {
? /** @type {BlockStatement} */ (context.visit(node.alternate))
: b.block([]);
consequent.body.unshift(b.stmt(b.call(b.member(b.id('$$payload'), b.id('push')), block_open)));
consequent.body.unshift(b.stmt(b.call(b.id('$$payload.push'), block_open)));
alternate.body.unshift(
b.stmt(b.call(b.member(b.id('$$payload'), b.id('push')), block_open_else))
b.stmt(b.call(b.id('$$payload.push'), block_open_else))
);
/** @type {Statement} */

@ -2,7 +2,6 @@ import type { AST, Binding, StateField } from '#compiler';
import type {
CallExpression,
ClassBody,
Expression,
Identifier,
LabeledStatement,
Program

Loading…
Cancel
Save