diff options
author | Dan Dascalescu <ddascalescu+github@gmail.com> | 2015-07-17 13:04:19 +0300 |
---|---|---|
committer | Dan Dascalescu <ddascalescu+github@gmail.com> | 2015-07-17 13:04:19 +0300 |
commit | 3a6b41361fea33023c1c22f2f719afbd0f45a618 (patch) | |
tree | 095c29b5f91804b4a40ad8e29ffc38d2281027cc /js/piwik.js | |
parent | ced23bac7521537754d1c55ca7e0f3958ad23877 (diff) |
Better test for the className being an actual string
Diffstat (limited to 'js/piwik.js')
-rw-r--r-- | js/piwik.js | 2 |
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; } |