FIX: The service observer was using `this` incorrectly

It was pointing at nothing due to context.
This commit is contained in:
Robin Ward 2022-01-20 16:33:01 -05:00
parent 847c77de65
commit d28808e866
1 changed files with 3 additions and 5 deletions

View File

@ -220,6 +220,7 @@ export default Component.extend({
@bind
_handleLogsNoticeUpdate() {
const { logsNoticeService } = this;
const logNotice = Notice.create({
text: htmlSafe(this.logsNoticeService.message),
id: "alert-logs-notice",
@ -227,13 +228,10 @@ export default Component.extend({
dismissable: true,
persistentDismiss: false,
visibility() {
return !this.logsNoticeService.hidden;
return !logsNoticeService.hidden;
},
onDismiss() {
this.logsNoticeService.setProperties({
hidden: true,
text: "",
});
logsNoticeService.set("text", "");
},
},
});