Skip to content

Avoid duplicate parent.type lookup in dev-globals Babel plugin - #5409

Closed
MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-3
Closed

Avoid duplicate parent.type lookup in dev-globals Babel plugin#5409
MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-3

Conversation

@MaddipatlaChetan24

Copy link
Copy Markdown
Contributor

Fixes #1, Fixes #2

Description

Reads path.parent.type once into a local parentType variable in the
Identifier visitor, instead of accessing it twice via two separate
path.parent.type === '...' checks. Same nodes are skipped as before
(MemberExpression and ClassMethod parents); no behavioral change.

Scope

Patch: Bug Fix

@DianaSuvorova

Copy link
Copy Markdown
Collaborator

Not sure what is the value here. Will close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants