mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-04 19:59:49 +00:00
onLocationChanged renamed to onHashChanged
This commit is contained in:
parent
9e8aaaf281
commit
ad827d19bd
1 changed files with 4 additions and 4 deletions
|
|
@ -31,12 +31,12 @@ class Router extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
window.addEventListener('hashchange', this.onLocationChanged);
|
||||
this.onLocationChanged();
|
||||
window.addEventListener('hashchange', this.onHashChanged);
|
||||
this.onHashChanged();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('hashchange', this.onLocationChanged);
|
||||
window.removeEventListener('hashchange', this.onHashChanged);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
|
|
@ -76,7 +76,7 @@ class Router extends React.Component {
|
|||
return null;
|
||||
}
|
||||
|
||||
onLocationChanged = () => {
|
||||
onHashChanged = () => {
|
||||
const hashPath = this.getHashPath();
|
||||
const routeConfig = this.routeConfigForPath(hashPath);
|
||||
if (routeConfig === null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue