mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 04:20:01 +00:00
Take advantage of transform-class-properties and use arrow functions instead of bind
This commit is contained in:
@@ -22,7 +22,7 @@ class AddModal extends React.Component {
|
||||
sources: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
addLayer() {
|
||||
addLayer = () => {
|
||||
const changedLayers = this.props.layers.slice(0)
|
||||
const layer = {
|
||||
id: this.state.id,
|
||||
@@ -151,7 +151,7 @@ class AddModal extends React.Component {
|
||||
}
|
||||
<Button
|
||||
className="maputnik-add-layer-button"
|
||||
onClick={this.addLayer.bind(this)}
|
||||
onClick={this.addLayer}
|
||||
data-wd-key="add-layer"
|
||||
>
|
||||
Add Layer
|
||||
|
||||
Reference in New Issue
Block a user