Skip to content

Commit 1e00251

Browse files
committed
Replace substring check by individual chars check
1 parent 48b2ec2 commit 1e00251

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
@@ -1147,7 +1147,7 @@ var htmx = (function() {
11471147
}
11481148
if (char === '<') {
11491149
chevronsCount++
1150-
} else if (selector.substring(i, i + 2) === '/>') {
1150+
} else if (char === '/' && i < selector.length - 1 && selector[i + 1] === '>') {
11511151
chevronsCount--
11521152
}
11531153
}

0 commit comments

Comments
 (0)