added missing glyphs property check on styleChanged - addresses #229

This commit is contained in:
jPalmer 2018-01-31 11:26:10 -08:00
parent ed85b838ec
commit d9b6f28bb5

View file

@ -111,6 +111,16 @@ export default class App extends React.Component {
}
onStyleChanged(newStyle, save=true) {
if(newStyle.glyphs === undefined){
let error = "Failed because no glyphs property found in style";
this.setState({
errors:[error]
})
console.error(error)
return
}
if(newStyle.glyphs !== this.state.mapStyle.glyphs) {
this.updateFonts(newStyle.glyphs)
}