From 8de7541bc597d88875ea7738659d18ed67a0877c Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 26 Jul 2016 23:13:07 +0200 Subject: [PATCH] client/posts: fix stripping query for edit page --- client/js/controllers/post_controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/js/controllers/post_controller.js b/client/js/controllers/post_controller.js index 56ca5355..edf54960 100644 --- a/client/js/controllers/post_controller.js +++ b/client/js/controllers/post_controller.js @@ -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;