Skip to content

Commit

Permalink
protect against null 'font' in text properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed Sep 17, 2015
1 parent 1374d7c commit fc7875d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/styles/text/feature_label.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class FeatureLabel {

constructFontStyle (rule, context, default_font_style) {
let style = {};
rule.font = rule.font || default_font_style;

// Use fill if specified, or default
style.fill = (rule.font.fill && Utils.toCanvasColor(StyleParser.parseColor(rule.font.fill, context))) || default_font_style.fill;
Expand Down

0 comments on commit fc7875d

Please sign in to comment.