Skip to content

Commit

Permalink
fix: unexpected undefined aliases
Browse files Browse the repository at this point in the history
fix #257
  • Loading branch information
qmhc committed Aug 4, 2023
1 parent e342242 commit fc51b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform.ts
Expand Up @@ -98,7 +98,7 @@ export function transformAliasImport(
aliases: Alias[],
exclude: (string | RegExp)[] = []
) {
if (!aliases.length) return content
if (!aliases?.length) return content

return content.replace(globalImportRE, str => {
let matchResult = str.match(staticImportRE)
Expand Down

0 comments on commit fc51b68

Please sign in to comment.