diff options
author | Eric Guzman | 2012-02-20 15:46:23 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-20 15:46:23 -0800 |
commit | c743b291e91b6de8440ecba0ddaf62546c1692f1 (patch) | |
tree | 3eb46134142904ff4c0067cc58d113423f6c0951 /js | |
parent | e23708721a71ca4c71365f5f8e8ac7d6113926db (diff) | |
download | ninja-c743b291e91b6de8440ecba0ddaf62546c1692f1.tar.gz |
Styles Controller -Fix invalid variable reference when looking for element's window object
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/styles-controller.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 44ca50e1..7d5dc42b 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -674,8 +674,9 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
674 | } | 674 | } |
675 | 675 | ||
676 | var matchingElements, i; | 676 | var matchingElements, i; |
677 | |||
677 | for(i = 0; i < specArr.length; i++) { | 678 | for(i = 0; i < specArr.length; i++) { |
678 | matchingElements = win.document.querySelectorAll(specArr[i].selector); | 679 | matchingElements = element.ownerDocument.querySelectorAll(specArr[i].selector); |
679 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { | 680 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { |
680 | return specArr[i]; | 681 | return specArr[i]; |
681 | } | 682 | } |