From 6597cc4cd075f94d257d50fea3c18e79471c8944 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 22 Jun 2018 13:42:43 +0800 Subject: [PATCH] Fix the build. --- .../javascripts/discourse/models/post-stream.js.es6 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/models/post-stream.js.es6 b/app/assets/javascripts/discourse/models/post-stream.js.es6 index a22a6b9a660..ae0a72df7a7 100644 --- a/app/assets/javascripts/discourse/models/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/post-stream.js.es6 @@ -108,8 +108,6 @@ export default RestModel.extend({ const result = {}; if (summary) { result.filter = "summary"; - } else { - result.filter = "none"; } const userFilters = this.get("userFilters"); @@ -191,8 +189,13 @@ export default RestModel.extend({ toggleSummary() { this.get("userFilters").clear(); this.toggleProperty("summary"); + const opts = {}; - return this.refresh().then(() => { + if (!this.get("summary")) { + opts.filter = "none"; + } + + return this.refresh(opts).then(() => { if (this.get("summary")) { this.jumpToSecondVisible(); }