Skip to content

Commit

Permalink
Fix binding access for plugin-transform-typescript (#13900)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Oct 30, 2021
1 parent 07d1a80 commit c20506e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/babel-plugin-transform-typescript/src/index.ts
Expand Up @@ -305,9 +305,8 @@ export default declare((api: ConfigAPI, opts: Options): Plugin => {
// just bail if there is no binding, since chances are good that if
// the import statement was injected then it wasn't a typescript type
// import anyway.
if (!importsToRemove.has(binding.path)) {
if (binding && !importsToRemove.has(binding.path)) {
if (
binding &&
isImportTypeOnly({
binding,
programPath: path,
Expand Down

0 comments on commit c20506e

Please sign in to comment.