diff --git a/lib/utils/indent-common.js b/lib/utils/indent-common.js index 6897ea4e7..020b6373b 100644 --- a/lib/utils/indent-common.js +++ b/lib/utils/indent-common.js @@ -1573,10 +1573,10 @@ module.exports.defineVisitor = function create( ) ) processNodeList(namedSpecifiers, leftBrace, rightBrace, 1) - for (const token of tokenStore.getTokensBetween( - leftBrace, + for (const token of [ + ...tokenStore.getTokensBetween(leftBrace, rightBrace), rightBrace - )) { + ]) { const i = beforeTokens.indexOf(token) if (i >= 0) { beforeTokens.splice(i, 1) diff --git a/tests/fixtures/script-indent/import-declaration-12.vue b/tests/fixtures/script-indent/import-declaration-12.vue new file mode 100644 index 000000000..fa622a696 --- /dev/null +++ b/tests/fixtures/script-indent/import-declaration-12.vue @@ -0,0 +1,11 @@ + + +