Skip to content

Commit

Permalink
Merge pull request primefaces#16821 from primefaces/issue-16559
Browse files Browse the repository at this point in the history
Fixed primefaces#16559 | p-buttonGroup throws console errors when styleClass is…
  • Loading branch information
mehmetcetin01140 authored Nov 22, 2024
2 parents 1b6eb82 + ff09185 commit 36810e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primeng/src/styleclass/styleclass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class StyleClass implements OnDestroy {
if (this.toggleClass) {
this.toggle();
} else {
if ((this.target as HTMLElement).offsetParent === null) this.enter();
if ((this.target as HTMLElement)?.offsetParent === null) this.enter();
else this.leave();
}
}
Expand Down

0 comments on commit 36810e2

Please sign in to comment.