Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 4, 2022
1 parent ed6c534 commit 813c9ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/migrate/migrations/routes/migrate_scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function find_declarations(content) {
const declared = new Set();

for (const statement of file.ast.statements) {
if (ts.isImportDeclaration(statement)) {
if (ts.isIdentifier(statement.importClause.name)) {
if (ts.isImportDeclaration(statement) && statement.importClause) {
if (statement.importClause.name) {
declared.add(statement.importClause.name.text);
}

Expand Down

0 comments on commit 813c9ed

Please sign in to comment.