From 5ef3bfe7f09aa8346418981bf95259554664e84a Mon Sep 17 00:00:00 2001 From: lxsang Date: Thu, 6 Aug 2020 23:15:38 +0200 Subject: [PATCH] fix notification error on service --- src/core/BaseModel.ts | 4 ++-- src/core/BaseService.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/BaseModel.ts b/src/core/BaseModel.ts index 39ada1f..3216ec3 100644 --- a/src/core/BaseModel.ts +++ b/src/core/BaseModel.ts @@ -599,7 +599,7 @@ namespace OS { ): void { const mt = this.meta(); let icon: string = undefined; - if (mt.icon) { + if (mt && mt.icon) { icon = `${mt.path}/${mt.icon}`; } return announcer.trigger(t, { @@ -608,7 +608,7 @@ namespace OS { data: { m: m, icon: icon, - iconclass: mt.iconclass, + iconclass: mt?mt.iconclass:undefined, e: e, }, }); diff --git a/src/core/BaseService.ts b/src/core/BaseService.ts index 5013f54..5efc224 100644 --- a/src/core/BaseService.ts +++ b/src/core/BaseService.ts @@ -105,7 +105,7 @@ namespace OS { constructor(name: string, args: AppArgumentsType[]) { super(name, args); this.icon = undefined; - this.iconclass = "fa-paper-plane-o"; + this.iconclass = "fa fa-paper-plane-o"; this.text = ""; this.timer = undefined; this.holder = undefined;