Skip to content

Commit c3b1c59

Browse files
committed
Replace substring check by individual chars check
1 parent f66f77b commit c3b1c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/htmx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ var htmx = (function() {
11451145
}
11461146
if (char === '<') {
11471147
chevronsCount++
1148-
} else if (selector.substring(i, i + 2) === '/>') {
1148+
} else if (char === '/' && i < selector.length - 1 && selector[i + 1] === '>') {
11491149
chevronsCount--
11501150
}
11511151
}

0 commit comments

Comments
 (0)