Skip to content

Commit fc51c42

Browse files
committed
Fix more issue
1 parent 6ea3c55 commit fc51c42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43188,7 +43188,8 @@ namespace ts {
4318843188

4318943189
// see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import.
4319043190
// parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import.
43191-
if (nodeArguments.length && isSpreadElement(nodeArguments[0])) {
43191+
const spreadElement = forEach(nodeArguments, isSpreadElement);
43192+
if (spreadElement) {
4319243193
return grammarErrorOnNode(nodeArguments[0], Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
4319343194
}
4319443195
return false;

0 commit comments

Comments
 (0)