Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorDan Dascalescu <ddascalescu+github@gmail.com>2015-07-17 13:04:19 +0300
committerDan Dascalescu <ddascalescu+github@gmail.com>2015-07-17 13:04:19 +0300
commit3a6b41361fea33023c1c22f2f719afbd0f45a618 (patch)
tree095c29b5f91804b4a40ad8e29ffc38d2281027cc /js
parentced23bac7521537754d1c55ca7e0f3958ad23877 (diff)
Better test for the className being an actual string
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 793cb1af2e..449b1ed7c6 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -1387,7 +1387,7 @@ if (typeof Piwik !== 'object') {
hasNodeCssClass: function (node, className)
{
if (node && className && className in node && node.className) {
- var classes = node.className.split(' ');
+ var classes = typeof node.className === "string" ? node.className.split(' ') : [];
if (-1 !== indexOfArray(classes, className)) {
return true;
}