aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Guzman2012-02-20 15:46:23 -0800
committerEric Guzman2012-02-20 15:46:23 -0800
commitc743b291e91b6de8440ecba0ddaf62546c1692f1 (patch)
tree3eb46134142904ff4c0067cc58d113423f6c0951
parente23708721a71ca4c71365f5f8e8ac7d6113926db (diff)
downloadninja-c743b291e91b6de8440ecba0ddaf62546c1692f1.tar.gz
Styles Controller -Fix invalid variable reference when looking for element's window object
-rwxr-xr-xjs/controllers/styles-controller.js3
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 }