Skip to content

Commit

Permalink
fix(typescript-estree): fix condition for dynamic import error
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 30, 2021
1 parent 1267140 commit 2a987e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typescript-estree/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ export class Converter {

case SyntaxKind.CallExpression: {
if (node.expression.kind === SyntaxKind.ImportKeyword) {
if (node.arguments.length > 2) {
if (node.arguments.length !== 1 && node.arguments.length !== 2) {
throw createError(
this.ast,
node.arguments.pos,
Expand Down

0 comments on commit 2a987e2

Please sign in to comment.