Skip to content
Snippets Groups Projects
Commit adf82669 authored by Giuseppe Digilio's avatar Giuseppe Digilio
Browse files

fixes

parent 58cc17f1
Branches
Tags
No related merge requests found
...@@ -22,6 +22,7 @@ import { fromTopEnter, fromTopInState, fromTopLeave, fromTopOutState } from '../ ...@@ -22,6 +22,7 @@ import { fromTopEnter, fromTopInState, fromTopLeave, fromTopOutState } from '../
import { fadeInEnter, fadeInState, fadeOutLeave, fadeOutState } from '../../animations/fade'; import { fadeInEnter, fadeInState, fadeOutLeave, fadeOutState } from '../../animations/fade';
import { NotificationAnimationsStatus } from '../models/notification-animations-type'; import { NotificationAnimationsStatus } from '../models/notification-animations-type';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { isNotEmpty } from '../../empty.util';
@Component({ @Component({
selector: 'ds-notification', selector: 'ds-notification',
...@@ -126,8 +127,8 @@ export class NotificationComponent implements OnInit, OnDestroy { ...@@ -126,8 +127,8 @@ export class NotificationComponent implements OnInit, OnDestroy {
private contentType(item: any, key: string) { private contentType(item: any, key: string) {
if (item instanceof TemplateRef) { if (item instanceof TemplateRef) {
this[key] = item; this[key] = item;
} else if (item instanceof Observable) { } else if (key === 'title' || key === 'content' ) {
this[key] = item; this[key] = isNotEmpty(item) ? item : Observable.of('');
} else { } else {
this[key] = this.domSanitizer.bypassSecurityTrustHtml(item); this[key] = this.domSanitizer.bypassSecurityTrustHtml(item);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment