From 7445b554e8f22abd058096690eff1e2186bdfd08 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 23 Apr 2013 19:38:31 -0700 Subject: [PATCH] Fix Uncaught TypeError: Cannot read property 'length' of null https://app.getsentry.com/id/id/group/5208581/ --- js/id/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/util.js b/js/id/util.js index 949cac896..84fe62535 100644 --- a/js/id/util.js +++ b/js/id/util.js @@ -60,7 +60,7 @@ iD.util.prefixCSSProperty = function(property) { iD.util.getStyle = function(selector) { for (var i = 0; i < document.styleSheets.length; i++) { - var rules = document.styleSheets[i].rules || document.styleSheets[i].cssRules; + var rules = document.styleSheets[i].rules || document.styleSheets[i].cssRules || []; for (var k = 0; k < rules.length; k++) { var selectorText = rules[k].selectorText && rules[k].selectorText.split(', '); if (_.contains(selectorText, selector)) {