Skip to content

Commit

Permalink
Fix indentation of functions that receive tables
Browse files Browse the repository at this point in the history
Credits to Arpple for providing the code that fixed this issue: trixnz#35 (comment)
  • Loading branch information
AgentOttsel committed Nov 28, 2018
1 parent 3cbb57c commit 66e7bed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ function printNodeNoParens(path: FastPath, options: Options, print: PrintFn) {
const canBreakLine = node.init.some(n =>
n != null &&
n.type !== 'TableConstructorExpression' &&
n.type !== 'FunctionDeclaration'
n.type !== 'FunctionDeclaration' &&
n.type !== 'CallExpression'
);

return group(
Expand Down

0 comments on commit 66e7bed

Please sign in to comment.