From: Janusz Dobrowolski Date: Sun, 28 Feb 2021 14:37:31 +0000 (+0100) Subject: Fixed javascript error appearing on themes using SVGElements. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=d34b343494b41494469fc0c2887ad85e6712ea32 Fixed javascript error appearing on themes using SVGElements. --- 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]; } }