mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 16:21:16 +01:00
added missing glyphs property check on styleChanged - addresses #229
This commit is contained in:
parent
ed85b838ec
commit
d9b6f28bb5
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue