Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
swandir committed Mar 29, 2022
1 parent 5454591 commit 43a1eb2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/babel-traverse/src/path/introspection.ts
Expand Up @@ -181,10 +181,11 @@ export function referencesImport(
): boolean {
if (!this.isReferencedIdentifier()) {
if (
(this.isMemberExpression() || this.isOptionalMemberExpression()) &&
(this.node.computed
? isStringLiteral(this.node.property, { value: importName })
: (this.node.property as t.Identifier).name === importName)
this.isJSXMemberExpression() ||
((this.isMemberExpression() || this.isOptionalMemberExpression()) &&
(this.node.computed
? isStringLiteral(this.node.property, { value: importName })
: (this.node.property as t.Identifier).name === importName))
) {
const object = (
this as NodePath<t.MemberExpression | t.OptionalMemberExpression>
Expand Down

0 comments on commit 43a1eb2

Please sign in to comment.