Fixed javascript error appearing on themes using SVGElements.
[fa-stable.git] / js / behaviour.js
index fa812c8be7152bbfaad52d1eb0563cd1c8ecafb5..917299fe0040f7ca537d540eeeee6f18a980801d 100644 (file)
@@ -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];
         }
       }