From d34b343494b41494469fc0c2887ad85e6712ea32 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 28 Feb 2021 15:37:31 +0100 Subject: [PATCH] Fixed javascript error appearing on themes using SVGElements. --- js/behaviour.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/behaviour.js b/js/behaviour.js index fa812c8b..917299fe 100644 --- a/js/behaviour.js +++ b/js/behaviour.js @@ -161,7 +161,7 @@ document.getElementsBySelector = function(selector) { currentContext = new Array; var currentContextIndex = 0; for (var k = 0; k < found.length; k++) { - if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) { + if (found[k].getAttribute('class') != null && found[k].getAttribute('class').match(new RegExp('\\b'+className+'\\b'))) { currentContext[currentContextIndex++] = found[k]; } } -- 2.30.2