diff --git a/packages/babel-traverse/src/path/family.ts b/packages/babel-traverse/src/path/family.ts index 9190351a0373..3238ec8d4b66 100644 --- a/packages/babel-traverse/src/path/family.ts +++ b/packages/babel-traverse/src/path/family.ts @@ -522,7 +522,7 @@ export function getBindingIdentifierPaths( if (id.isExportDeclaration()) { const declaration = id.get("declaration"); - if (declaration.isDeclaration()) { + if (t.isDeclaration(declaration)) { search.push(declaration); } continue;