Skip to content

Commit f74824f

Browse files
committed
fix(grid): fix edge case crash in ngOnDestroy when subscriptions array is undefined
This is solved by initializing subscriptions array as empty array Closes #79
1 parent bce1287 commit f74824f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/angular-grid-layout/src/lib/grid.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export class KtdGridComponent implements OnChanges, AfterContentInit, AfterConte
309309
private placeholder: HTMLElement | null;
310310

311311
private _gridItemsRenderData: KtdDictionary<KtdGridItemRenderData<number>>;
312-
private subscriptions: Subscription[];
312+
private subscriptions: Subscription[] = [];
313313

314314
constructor(private gridService: KtdGridService,
315315
private elementRef: ElementRef,

0 commit comments

Comments
 (0)