Fixed notifications

This commit is contained in:
Giuseppe Digilio
2018-03-14 13:26:58 +01:00
parent d3949c17e1
commit 5045b810c8

View File

@@ -129,6 +129,7 @@ export class NotificationComponent implements OnInit, OnDestroy {
this[key] = item;
} else if (key === 'title' || key === 'content') {
let value = null;
if (isNotEmpty(item)) {
if (typeof item === 'string') {
value = Observable.of(item);
} else if (item instanceof Observable) {
@@ -139,6 +140,7 @@ export class NotificationComponent implements OnInit, OnDestroy {
// so converts it again to Observable
value = Observable.of(item.value);
}
}
this[key] = value
} else {
this[key] = this.domSanitizer.bypassSecurityTrustHtml(item);