diff options
author | Eric Guzman | 2012-02-20 11:23:47 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-20 11:23:47 -0800 |
commit | a9f81445afbc10b246ebbbcf99a0db11a9679021 (patch) | |
tree | 7049ff01ecf91f9b5a35fa5de4119cc323a9881b /js/controllers | |
parent | e23708721a71ca4c71365f5f8e8ac7d6113926db (diff) | |
download | ninja-a9f81445afbc10b246ebbbcf99a0db11a9679021.tar.gz |
Styles controller - Check for element's window object before querying for matching css rules.
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/styles-controller.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 44ca50e1..71e2c7f9 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -571,6 +571,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
571 | rules = [], | 571 | rules = [], |
572 | win = element.ownerDocument.defaultView, | 572 | win = element.ownerDocument.defaultView, |
573 | self = this; | 573 | self = this; |
574 | |||
575 | if(!win) { | ||
576 | return null; | ||
577 | } | ||
574 | 578 | ||
575 | if(!omitPseudos) { | 579 | if(!omitPseudos) { |
576 | pseudos.concat(['link', 'visited', 'active', 'hover', 'focus', 'first-letter', | 580 | pseudos.concat(['link', 'visited', 'active', 'hover', 'focus', 'first-letter', |