Visitar URL original
Fix trailing comma handling for Angular functions · prettier/prettier@511f391 · GitHub
Skip to content

Commit 511f391

Browse files
committed
Fix trailing comma handling for Angular functions
1 parent ff21ab6 commit 511f391

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/language-js/print/function-parameters.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ function printFunctionParameters(
185185
typeParametersDoc,
186186
"(",
187187
indent([softline, ...printed]),
188-
189188
!hasRestParameter(functionNode) &&
190189
// Angular does not allow trailing comma
191-
!options.parser.startsWith("__ng_")
190+
path.root.type !== "NGRoot"
192191
? printTrailingComma(options, "all")
193192
: "",
194193
softline,

0 commit comments

Comments
 (0)