Skip to content

Commit e392310

Browse files
committed
fixed nullpointer in notification center in comp type comparison after delete component
1 parent 4044e7d commit e392310

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

client/src/app/dashboard/info-center/info-center-datasource.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ export class InfoCenterDataSource extends DataSource<InfoCenterItem> {
5252
return true;
5353
} else {
5454
const instance = this.storeService.getState().instances[notifItem.instanceId];
55-
if (this.instanceId) {
56-
return instance.id === this.instance.id;
55+
if (instance) {
56+
if (this.instanceId) {
57+
return instance.id === this.instance.id;
58+
} else {
59+
return instance.componentType === this.compType;
60+
}
5761
} else {
58-
return instance.componentType === this.compType;
62+
return false;
5963
}
6064
}
6165
}

0 commit comments

Comments
 (0)