mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(prettier): Private Field Expression (#1459)
This commit is contained in:
parent
5aca375a94
commit
f81f15ff71
1 changed files with 1 additions and 4 deletions
|
|
@ -1322,10 +1322,7 @@ impl<'a> Format<'a> for PrivateFieldExpression<'a> {
|
|||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
let mut parts = p.vec();
|
||||
parts.push(format!(p, self.object));
|
||||
if self.optional {
|
||||
parts.push(ss!("?."));
|
||||
}
|
||||
parts.push(ss!("#"));
|
||||
parts.push(if self.optional { ss!("?.") } else { ss!(".") });
|
||||
parts.push(format!(p, self.field));
|
||||
Doc::Array(parts)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue