From 3116e3e23dc036e81430c6258906ce16067eb624 Mon Sep 17 00:00:00 2001 From: underfin <2218301630@qq.com> Date: Fri, 12 Jan 2024 13:38:40 +0800 Subject: [PATCH] fix: default visitor should visit prop init at visit_object_property --- crates/oxc_ast/src/visit_mut.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/oxc_ast/src/visit_mut.rs b/crates/oxc_ast/src/visit_mut.rs index a15a72c24fb8e..c73f27a073e05 100644 --- a/crates/oxc_ast/src/visit_mut.rs +++ b/crates/oxc_ast/src/visit_mut.rs @@ -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); }