Skip to content

Commit f2c657a

Browse files
committed
fix errant i that is not set for property to variable assigment when import statements are present
1 parent a721b13 commit f2c657a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/postcss/property-to-variable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const propertyToCssVariablePolyfill = (pluginOptions = {}) => {
3535
const fallbackSelectorsAst = postcss.parse(fallbackSelectors, { from: sourceFile });
3636

3737
let lastImportIndex = -1;
38-
for (const node of root.nodes) {
38+
for (const [i, node] of root.nodes.entries()) {
3939
if (node.type === 'atrule' && node.name === 'import') {
4040
lastImportIndex = i
4141
}

0 commit comments

Comments
 (0)