Skip to content

Commit

Permalink
fix: default visitor should visit prop init at visit_object_property (
Browse files Browse the repository at this point in the history
#2000)

The `visit_object_property` should visit `prop.int` node.
  • Loading branch information
underfin authored Jan 12, 2024
1 parent 6a7e4be commit 0d77e1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/oxc_ast/src/visit_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,9 @@ pub trait VisitMut<'a>: Sized {
self.enter_node(kind);
self.visit_property_key(&mut prop.key);
self.visit_expression(&mut prop.value);
if let Some(init) = &mut prop.init {
self.visit_expression(init);
}
self.leave_node(kind);
}

Expand Down

0 comments on commit 0d77e1e

Please sign in to comment.