mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Clean up MetaMetricsProvider constructor (#7719)
This commit is contained in:
parent
6c1bce28ac
commit
1820836833
@ -42,19 +42,19 @@ class MetaMetricsProvider extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
previousPath: '',
|
||||
currentPath: window.location.href,
|
||||
}
|
||||
|
||||
props.history.listen(() => {
|
||||
this.setState({
|
||||
previousPath: this.state.currentPath,
|
||||
this.setState((prevState) => ({
|
||||
previousPath: prevState.currentPath,
|
||||
currentPath: window.location.href,
|
||||
})
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
state = {
|
||||
previousPath: '',
|
||||
currentPath: window.location.href,
|
||||
}
|
||||
|
||||
getChildContext () {
|
||||
const {
|
||||
network,
|
||||
|
Loading…
Reference in New Issue
Block a user