Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix binding access for plugin-transform-typescript #13900

Merged
merged 1 commit into from Oct 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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