Skip to content

Commit caa0f54

Browse files
committed
fix: cssPath nth-child if childern > 1
1 parent c350830 commit caa0f54

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
"webpack-log": "^3.0.1"
6262
},
6363
"dependencies": {
64-
"@cocreate/docs": "^1.2.60"
64+
"@cocreate/docs": "^1.2.61"
6565
}
6666
}

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export function cssPath(node, container) {
3434
});
3535
}
3636

37-
if (node.parentNode) {
37+
if (node.parentNode && node.parentNode.children.length > 1) {
38+
3839
let index = Array.prototype.indexOf.call(
3940
node.parentNode.children,
4041
node

0 commit comments

Comments
 (0)