diff options
| author | rr- <rr-@sakuya.pl> | 2017-04-24 23:02:25 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2017-04-24 23:02:25 +0200 |
| commit | fea9a949453482f7ede7957dbeeddb3c2ff427cc (patch) | |
| tree | 3b6358f4026f41a4d87f6ae89f5f8b4f699088e7 /client/js/controllers/user_list_controller.js | |
| parent | 467b4a76308b2fc4478dd3586e6339c88cc499b2 (diff) | |
client/routing: fix certain history bug
The bug could be reproduced as follows:
1. Navigate to /posts
2. Search for "test"
3. Navigate to /posts again
4. Refresh the page
The user should see plain post list, but instead they were seeing the
"test" search results again as if step 3 never happened.
Diffstat (limited to 'client/js/controllers/user_list_controller.js')
| -rw-r--r-- | client/js/controllers/user_list_controller.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/js/controllers/user_list_controller.js b/client/js/controllers/user_list_controller.js index 16f3b9b..fa878d8 100644 --- a/client/js/controllers/user_list_controller.js +++ b/client/js/controllers/user_list_controller.js @@ -1,6 +1,7 @@ 'use strict'; const api = require('../api.js'); +const router = require('../router.js'); const uri = require('../util/uri.js'); const UserList = require('../models/user_list.js'); const topNavigation = require('../models/top_navigation.js'); @@ -38,9 +39,7 @@ class UserListController { } _evtNavigate(e) { - history.pushState( - null, - window.title, + router.showNoDispatch( uri.formatClientLink('users', e.detail.parameters)); Object.assign(this._ctx.parameters, e.detail.parameters); this._syncPageController(); |