Skip to content

Commit

Permalink
fix(core): cannot read property kind of undefined (#21715)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxence-lefebvre authored Mar 25, 2024
1 parent e0519d9 commit 85aa577
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ exports[`updateImports should update dynamic imports 1`] = `
exports[`updateImports should update imports and reexports 1`] = `
"
import { MyClass } from '@proj/my-destination';
export { MyClass };
export { MyOtherClass } from '@proj/my-destination';
export class MyExtendedClass extends MyClass {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ describe('updateImports', () => {
importerFilePath,
`
import { MyClass } from '@proj/my-source';
export { MyClass };
export { MyOtherClass } from '@proj/my-source';
export class MyExtendedClass extends MyClass {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function updateImportDeclarations(
const changes: StringChange[] = [];

for (const { moduleSpecifier } of importDecls) {
if (tsModule.isStringLiteral(moduleSpecifier)) {
if (moduleSpecifier && tsModule.isStringLiteral(moduleSpecifier)) {
changes.push(...updateModuleSpecifier(moduleSpecifier, from, to));
}
}
Expand Down

0 comments on commit 85aa577

Please sign in to comment.