From c910e9962c87eb626605432005d21034d488166d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Sep 2019 14:59:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index f8f6820f5..a2f9a14e5 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -296,11 +296,11 @@ class CoursesIndex extends Component{ componentDidMount(){ // this.updataleftNav() - this.historyArray = [location.pathname]; + this.historyArray = [window.location.pathname]; this.props.history.listen( location => { console.log(location); - this.historyArray.unshift(location.pathname); + this.historyArray.unshift(window.location.pathname); this.historyArray.length = 2; //Do your stuff here });