mirror of
https://github.com/maputnik/editor.git
synced 2026-08-02 19:27:25 +00:00
Fix for when 'layout.visibility' is undefined
This commit is contained in:
@@ -209,6 +209,7 @@ export default class LayerEditor extends React.Component {
|
|||||||
</LayerEditorGroup>
|
</LayerEditorGroup>
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const layout = this.props.layer.layout || {}
|
||||||
|
|
||||||
const items = {
|
const items = {
|
||||||
delete: {
|
delete: {
|
||||||
@@ -220,7 +221,7 @@ export default class LayerEditor extends React.Component {
|
|||||||
handler: () => this.props.onLayerCopy(this.props.layer.id)
|
handler: () => this.props.onLayerCopy(this.props.layer.id)
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
text: (this.props.layer.layout.visibility === "visible") ? "Hide" : "Show",
|
text: (layout.visibility === "none") ? "Show" : "Hide",
|
||||||
handler: () => this.props.onLayerVisibilityToggle(this.props.layer.id)
|
handler: () => this.props.onLayerVisibilityToggle(this.props.layer.id)
|
||||||
},
|
},
|
||||||
moveLayerUp: {
|
moveLayerUp: {
|
||||||
|
|||||||
Reference in New Issue
Block a user