fix(angular): add missing parens for pipe in ternary (#5397)
parent
9acb02997a
commit
423ddf9abd
|
@ -513,6 +513,7 @@ function needsParens(path, options) {
|
|||
case "SpreadProperty":
|
||||
case "BinaryExpression":
|
||||
case "LogicalExpression":
|
||||
case "NGPipeExpression":
|
||||
case "ExportDefaultDeclaration":
|
||||
case "AwaitExpression":
|
||||
case "JSXSpreadAttribute":
|
||||
|
|
|
@ -36,7 +36,8 @@ exports[`pipe-expression.ng - __ng_interpolation-verify 1`] = `
|
|||
keyA: reallySuperLongValue,
|
||||
keyB: shortValue | pipeB | pipeC: valueToPipeC
|
||||
}
|
||||
| aaa
|
||||
| aaa,
|
||||
(hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection)
|
||||
]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[
|
||||
|
@ -63,6 +64,10 @@ exports[`pipe-expression.ng - __ng_interpolation-verify 1`] = `
|
|||
keyA: reallySuperLongValue,
|
||||
keyB: shortValue | pipeB | pipeC: valueToPipeC
|
||||
}
|
||||
| aaa
|
||||
| aaa,
|
||||
(hideLinqPanel
|
||||
? "ReportSelection.HideShowLabel_Show.String"
|
||||
: "ReportSelection.HideShowLabel_Hide.String")
|
||||
| localize: localizationSection
|
||||
]
|
||||
`;
|
||||
|
|
|
@ -20,5 +20,6 @@
|
|||
keyA: reallySuperLongValue,
|
||||
keyB: shortValue | pipeB | pipeC: valueToPipeC
|
||||
}
|
||||
| aaa
|
||||
| aaa,
|
||||
(hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection)
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue