From 183c93904dce9b324aa35e0204290060cc177a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 25 Nov 2014 19:09:17 +0100 Subject: [PATCH] FIX: don't show the banner topic on error page --- .../javascripts/discourse/components/discourse-banner.js.es6 | 4 ++-- app/assets/javascripts/discourse/templates/topic.hbs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/components/discourse-banner.js.es6 b/app/assets/javascripts/discourse/components/discourse-banner.js.es6 index 421510f072e..a3f8f07d67c 100644 --- a/app/assets/javascripts/discourse/components/discourse-banner.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-banner.js.es6 @@ -10,8 +10,8 @@ export default VisibleComponent.extend({ if (bannerKey) { bannerKey = parseInt(bannerKey, 10); } if (dismissedBannerKey) { dismissedBannerKey = parseInt(dismissedBannerKey, 10); } - return bannerKey && dismissedBannerKey !== bannerKey; - }.property("user.dismissed_banner_key", "banner.key"), + return !this.get("hide") && bannerKey && dismissedBannerKey !== bannerKey; + }.property("user.dismissed_banner_key", "banner.key", "hide"), actions: { dismiss: function () { diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index e203fdaf48a..37feb1da48e 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -1,7 +1,7 @@
{{custom-html "top"}} {{global-notice}} - {{discourse-banner user=currentUser banner=site.banner overlay=view.hasScrolled}} + {{discourse-banner user=currentUser banner=site.banner overlay=view.hasScrolled hide=errorLoading}}
{{#if postStream.loaded}}