From afff145bd3077cf14483ec1f7670ba371d92aa43 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 15 Oct 2013 12:39:43 -0400 Subject: [PATCH] FIX: Query params were going a bit haywire when going from topic to topic. --- app/assets/javascripts/discourse/components/url.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/url.js b/app/assets/javascripts/discourse/components/url.js index 3eeae173754..c5532686a54 100644 --- a/app/assets/javascripts/discourse/components/url.js +++ b/app/assets/javascripts/discourse/components/url.js @@ -62,7 +62,7 @@ Discourse.URL = Em.Object.createWithMixins({ // TODO: Extract into rules we can inject into the URL handler if (this.navigatedToHome(oldPath, path)) { return; } if (this.navigatedToListMore(oldPath, path)) { return; } - if (this.navigatedToHome(oldPath, path)) { return; } + if (this.navigatedToPost(oldPath, path)) { return; } if (path.match(/^\/?users\/[^\/]+$/)) { path += "/activity"; @@ -147,6 +147,7 @@ Discourse.URL = Em.Object.createWithMixins({ // Abort routing, we have replaced our state. return true; } + this.set('queryParams', null); } return false;