Skip to content

Commit 3e105c7

Browse files
committed
fix
1 parent 5e611b5 commit 3e105c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/core/utils/dq-element.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getFullPathSelector(elm) {
2424
const element = elm;
2525
const names = [];
2626
while (elm.parentElement && elm.nodeName !== 'BODY') {
27-
if(sourceCache.has(elm)) {
27+
if (sourceCache.has(elm)) {
2828
names.unshift(sourceCache.get(elm));
2929
break;
3030
} else if (elm.id) {
@@ -33,7 +33,9 @@ function getFullPathSelector(elm) {
3333
} else {
3434
let c = 1,
3535
e = elm;
36-
for (; e.previousElementSibling; e = e.previousElementSibling, c++) {}
36+
for (; e.previousElementSibling; e = e.previousElementSibling, c++) {
37+
// Increment counter for each previous sibling
38+
}
3739
names.unshift(elm.nodeName + ':nth-child(' + c + ')');
3840
}
3941
elm = elm.parentElement;

0 commit comments

Comments
 (0)