We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2566e57 commit c09257bCopy full SHA for c09257b
crates/formatter/src/internal/printer/mod.rs
@@ -495,7 +495,9 @@ impl<'arena> Printer<'arena> {
495
Document::Group(group) => {
496
let group_mode = if *group.should_break.borrow() { Mode::Break } else { mode };
497
if group.expanded_states.is_some() && group_mode.is_break() {
498
- if let Some(last_state) = group.expanded_states.as_ref().unwrap().last() {
+ if let Some(expanded_states) = group.expanded_states.as_ref()
499
+ && let Some(last_state) = expanded_states.last()
500
+ {
501
stack.push((group_mode, last_state));
502
}
503
} else {
0 commit comments