From c3b1c5966b9581e880bae4f51aca0cdea2ae1d8c Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 18 Nov 2024 09:32:11 +0100 Subject: [PATCH] Replace substring check by individual chars check --- src/htmx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmx.js b/src/htmx.js index 8b23060a2..8be6c5821 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -1145,7 +1145,7 @@ var htmx = (function() { } if (char === '<') { chevronsCount++ - } else if (selector.substring(i, i + 2) === '/>') { + } else if (char === '/' && i < selector.length - 1 && selector[i + 1] === '>') { chevronsCount-- } }