Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
[NG] fix alert visibility issue (#2971)
Browse files Browse the repository at this point in the history
In prod mode first alert in alert list is not visible to the user.

closes #2430

Signed-off-by: Cory Rylan <crylan@vmware.com>
  • Loading branch information
coryrylan committed Jan 3, 2019
1 parent 33ff56b commit 399ea3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clr-angular/emphasis/alert/alert.ts
Expand Up @@ -60,7 +60,9 @@ export class ClrAlert {

get isHidden() {
if (this.multiAlertService) {
if (this.multiAlertService.currentAlert === this) {
// change detection issue in production mode causes currentAlert to be undefined when only the first alert exists
// https://github.com/vmware/clarity/issues/2430
if (this.multiAlertService.currentAlert === this || this.multiAlertService.count === 0) {
if (this.hidden === true) {
this.previouslyHidden = true;
this.hidden = false;
Expand Down

0 comments on commit 399ea3b

Please sign in to comment.