mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
added missing glyphs property check on styleChanged - addresses #229
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user