Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid exception when selectorText not defined

  • Loading branch information...
commit 21859d5c571f372896fe96a93e15c7e1cc11220a 1 parent c5ee555
@haraldrudell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/jsdom/browser/index.js
View
2  lib/jsdom/browser/index.js
@@ -249,7 +249,7 @@ exports.createWindow = function(dom, options) {
forEach.call(node.ownerDocument.styleSheets, function (sheet) {
forEach.call(sheet.cssRules, function (ruleSet) {
- selectors = ruleSet.selectorText.split(/\s*,\s*/);
+ selectors = typeof ruleSet.selectorText == 'string' ? ruleSet.selectorText.split(/\s*,\s*/) : [];
matched = false;
selectors.forEach(function (selectorText) {
if (!matched && matchesDontThrow(node, selectorText)) {
Please sign in to comment.
Something went wrong with that request. Please try again.