diff --git a/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs b/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs index a5ba397567745..0f016eff87507 100644 --- a/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs +++ b/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs @@ -145,7 +145,7 @@ fn mark_lone_block(parent_node: &AstNode, lone_blocks: &mut Vec<&AstNode>) { return; } - if lone_blocks.last().map_or(false, |last| last.id() == parent_node.id()) { + if lone_blocks.last().is_some_and(|last| last.id() == parent_node.id()) { lone_blocks.pop(); } }