From ad827d19bd372ed4395fcd7e82a4bb270faf6c8b Mon Sep 17 00:00:00 2001 From: NikolaBorislavovHristov Date: Sun, 21 Apr 2019 21:36:00 +0300 Subject: [PATCH] onLocationChanged renamed to onHashChanged --- src/navigation/Router/Router.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/navigation/Router/Router.js b/src/navigation/Router/Router.js index 1ae993519..bfc84146d 100644 --- a/src/navigation/Router/Router.js +++ b/src/navigation/Router/Router.js @@ -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) {