Skip to content

Commit

Permalink
fix: add missing subscribe to avatar component
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Aug 27, 2024
1 parent 7266fc6 commit 12de803
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Input,
NgZone,
OnChanges,
OnDestroy,
OnInit,
SimpleChanges,
} from '@angular/core';
Expand All @@ -27,7 +28,7 @@ import {
styleUrls: ['./avatar.component.scss'],
})
export class AvatarComponent
implements OnChanges, OnInit, OnChanges, AfterViewInit
implements OnChanges, OnInit, OnChanges, AfterViewInit, OnDestroy
{
/**
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
Expand Down Expand Up @@ -113,6 +114,10 @@ export class AvatarComponent
}
}

ngOnDestroy(): void {
this.subscriptions.forEach((s) => s.unsubscribe());
}

private setFallbackChannelImage() {
if (this.type !== 'channel') {
this.fallbackChannelImage = undefined;
Expand Down

0 comments on commit 12de803

Please sign in to comment.