FIX: Deprecated overwriting of computed property
We can set `hide` to true instead of overwriting the property on dismiss.
This commit is contained in:
parent
e6821fbaae
commit
070fe7f45d
|
@ -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 = $("<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"),
|
||||
|
|
Loading…
Reference in New Issue