Skip to content

Commit 2314921

Browse files
committed
fix: check if change has been made to input
Signed-off-by: Akshat Patel <[email protected]>
1 parent 71468fe commit 2314921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/icon/icon.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class IconDirective implements AfterViewInit, OnChanges {
126126
ngOnChanges({ cdsIcon }: SimpleChanges) {
127127
// We want to ignore first change to let the icon register
128128
// and add only after view has been initialized
129-
if (!cdsIcon.isFirstChange()) {
129+
if (cdsIcon && !cdsIcon.isFirstChange()) {
130130
this.renderIcon(this.cdsIcon);
131131
}
132132
}

0 commit comments

Comments
 (0)