Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx authored Mar 21, 2024
1 parent 3603f62 commit 03b4840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/macros/src/babel/macros-babel-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function main(context: typeof Babel): unknown {
relativePath = specifier.quasis[0].value.cooked;
property = specifier.expressions[0];
}
if (relativePath && relativePath.startsWith('.')) {
if (property && relativePath && relativePath.startsWith('.')) {
const resolvedPath = resolve(dirname((state as any).filename), relativePath);
let entries: string[] = [];
if (existsSync(resolvedPath)) {
Expand Down

0 comments on commit 03b4840

Please sign in to comment.