Skip to content

Commit 36c183d

Browse files
committed
perf
1 parent 6444ba5 commit 36c183d

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/cjs_parse.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ impl Visit for CjsVisitor {
250250
AssignTarget::Simple(SimpleAssignTarget::Ident(left_ident)) => {
251251
if is_exports_ident(&left_ident.id) {
252252
self.visit_exports_right_expr(&assign_expr.right);
253-
} else if let Some(right_expr) = assign_expr.right.as_assign() {
254-
self.visit_assign_expr(right_expr);
255253
}
256254
}
257255
AssignTarget::Simple(SimpleAssignTarget::Member(left_member)) => {
@@ -263,9 +261,6 @@ impl Visit for CjsVisitor {
263261
// * `exports.something = other`
264262
if let Some(prop_name) = get_member_prop_text(&left_member.prop) {
265263
self.add_export(prop_name);
266-
if let Some(right_expr) = assign_expr.right.as_assign() {
267-
self.visit_assign_expr(right_expr);
268-
}
269264
} else if let Some(right_member) = assign_expr.right.as_member() {
270265
// check for:
271266
// * `exports[key] = _something[key];
@@ -278,15 +273,9 @@ impl Visit for CjsVisitor {
278273
self.add_reexport(&require_value);
279274
}
280275
}
281-
} else if let Some(right_expr) = assign_expr.right.as_assign() {
282-
self.visit_assign_expr(right_expr);
283-
}
284-
}
285-
_ => {
286-
if let Some(right_expr) = assign_expr.right.as_assign() {
287-
self.visit_assign_expr(right_expr);
288276
}
289277
}
278+
_ => {}
290279
}
291280
}
292281
}

0 commit comments

Comments
 (0)