mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-15 04:31:17 +01:00
Remove UNSAFE_componentWillUpdate
This commit is contained in:
parent
4e37d834ed
commit
4ba71c8bd5
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,7 @@ class AddModal extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UNSAFE_componentWillUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
// Check if source is valid for new type
|
// Check if source is valid for new type
|
||||||
const oldType = this.state.type;
|
const oldType = this.state.type;
|
||||||
const newType = nextState.type;
|
const newType = nextState.type;
|
||||||
|
@ -75,6 +75,7 @@ class AddModal extends React.Component {
|
||||||
source: ""
|
source: ""
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLayersForSource(source) {
|
getLayersForSource(source) {
|
||||||
|
|
Loading…
Reference in a new issue