mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Fix Uncaught TypeError: Cannot read property 'length' of null
https://app.getsentry.com/id/id/group/5208581/
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user