mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Fixed notifications
This commit is contained in:
@@ -129,15 +129,17 @@ export class NotificationComponent implements OnInit, OnDestroy {
|
|||||||
this[key] = item;
|
this[key] = item;
|
||||||
} else if (key === 'title' || key === 'content') {
|
} else if (key === 'title' || key === 'content') {
|
||||||
let value = null;
|
let value = null;
|
||||||
if (typeof item === 'string') {
|
if (isNotEmpty(item)) {
|
||||||
value = Observable.of(item);
|
if (typeof item === 'string') {
|
||||||
} else if (item instanceof Observable) {
|
value = Observable.of(item);
|
||||||
value = item;
|
} else if (item instanceof Observable) {
|
||||||
} else if (typeof item === 'object' && isNotEmpty(item.value)) {
|
value = item;
|
||||||
// when notifications state is transferred from SSR to CSR,
|
} else if (typeof item === 'object' && isNotEmpty(item.value)) {
|
||||||
// Observables Object loses the instance type and become simply object,
|
// when notifications state is transferred from SSR to CSR,
|
||||||
// so converts it again to Observable
|
// Observables Object loses the instance type and become simply object,
|
||||||
value = Observable.of(item.value);
|
// so converts it again to Observable
|
||||||
|
value = Observable.of(item.value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this[key] = value
|
this[key] = value
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user