client/posts: fix stripping query for edit page

This commit is contained in:
rr- 2016-07-26 23:13:07 +02:00
parent 8ef0017531
commit 8de7541bc5

View file

@ -29,7 +29,10 @@ class PostController {
// be still accessed after history navigation / page refresh
if (parameters.query) {
ctx.state.parameters = parameters;
router.replace('/post/' + id, ctx.state, false);
const url = editMode ?
'/post/' + id + '/edit' :
'/post/' + id;
router.replace(url, ctx.state, false);
}
this._post = post;