Comparing version 0.1.1 to 0.1.2
@@ -9,12 +9,12 @@ var gcss = (function() { | ||
var styles = []; | ||
json.stylesheet.rules.forEach(function(rule) { | ||
var selectors = rule.selectors.map(function(selector) { | ||
(json.stylesheet.rules || []).forEach(function(rule) { | ||
var selectors = (rule.selectors || []).map(function(selector) { | ||
var parts = selector.split(':'); | ||
return { | ||
elementType: parts[0] || 'all', | ||
featureType: parts[1] || 'all' | ||
featureType: parts[0] || 'all', | ||
elementType: parts[1] || 'all' | ||
}; | ||
}); | ||
var stylers = rule.declarations.map(function(declaration) { | ||
var stylers = (rule.declarations || []).map(function(declaration) { | ||
var styler = {}; | ||
@@ -21,0 +21,0 @@ styler[declaration.property] = declaration.value; |
{ | ||
"name": "gmaps-css", | ||
"description": "Write custom Google Maps styles in familiar CSS syntax.", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Dan Burzo", | ||
@@ -6,0 +6,0 @@ "homepage": "http://danburzo.ro", |
3625