mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 14:57:45 +01:00
Fix for when 'layout.visibility' is undefined
This commit is contained in:
parent
b116eef147
commit
32edb48e16
1 changed files with 2 additions and 1 deletions
|
@ -209,6 +209,7 @@ export default class LayerEditor extends React.Component {
|
|||
</LayerEditorGroup>
|
||||
})
|
||||
|
||||
const layout = this.props.layer.layout || {}
|
||||
|
||||
const items = {
|
||||
delete: {
|
||||
|
@ -220,7 +221,7 @@ export default class LayerEditor extends React.Component {
|
|||
handler: () => this.props.onLayerCopy(this.props.layer.id)
|
||||
},
|
||||
hide: {
|
||||
text: (this.props.layer.layout.visibility === "visible") ? "Hide" : "Show",
|
||||
text: (layout.visibility === "none") ? "Show" : "Hide",
|
||||
handler: () => this.props.onLayerVisibilityToggle(this.props.layer.id)
|
||||
},
|
||||
moveLayerUp: {
|
||||
|
|
Loading…
Reference in a new issue