From 070fe7f45d1655bdd6ab64fbbba6adc68e6b8b15 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 2 Oct 2020 13:26:57 -0400 Subject: [PATCH] FIX: Deprecated overwriting of computed property We can set `hide` to true instead of overwriting the property on dismiss. --- .../javascripts/discourse/app/components/discourse-banner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/discourse-banner.js b/app/assets/javascripts/discourse/app/components/discourse-banner.js index e9149bb0e8d..baf54cfdc28 100644 --- a/app/assets/javascripts/discourse/app/components/discourse-banner.js +++ b/app/assets/javascripts/discourse/app/components/discourse-banner.js @@ -2,6 +2,8 @@ import discourseComputed from "discourse-common/utils/decorators"; import Component from "@ember/component"; export default Component.extend({ + hide: false, + @discourseComputed("banner.html") content(bannerHtml) { const $div = $("
"); @@ -30,7 +32,7 @@ export default Component.extend({ if (this.user) { this.user.dismissBanner(this.get("banner.key")); } else { - this.set("visible", false); + this.set("hide", true); this.keyValueStore.set({ key: "dismissed_banner_key", value: this.get("banner.key"),