Skip to content

Commit 3c3476c

Browse files
fix(generator): ternary arms were swapped
1 parent febba1b commit 3c3476c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function format(node: AST | null): string {
106106
? `${format(node.object)}[${format(node.property)}]`
107107
: `${format(node.object)}.${format(node.property)}`
108108
case 'ConditionalExpression':
109-
return `${format(node.test)}?${format(node.consequent)}:${format(node.alternate)}`
109+
return `${format(node.test)}?${format(node.alternate)}:${format(node.consequent)}`
110110
case 'CallExpression':
111111
return `${format(node.callee)}(${node.arguments.map(format).join(',')})`
112112
case 'Program':

0 commit comments

Comments
 (0)