Skip to content

Commit

Permalink
fix(grid): fix edge case crash in ngOnDestroy when subscriptions arra…
Browse files Browse the repository at this point in the history
…y is undefined

This is solved by initializing subscriptions array as empty array

Closes #79
  • Loading branch information
llorenspujol committed Jun 13, 2024
1 parent bce1287 commit f74824f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/angular-grid-layout/src/lib/grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class KtdGridComponent implements OnChanges, AfterContentInit, AfterConte
private placeholder: HTMLElement | null;

private _gridItemsRenderData: KtdDictionary<KtdGridItemRenderData<number>>;
private subscriptions: Subscription[];
private subscriptions: Subscription[] = [];

constructor(private gridService: KtdGridService,
private elementRef: ElementRef,
Expand Down

0 comments on commit f74824f

Please sign in to comment.