Skip to content

Commit 882eb4c

Browse files
arschmitzscottgonzalez
authored andcommitted
Checkboxradio: Check that there is an icon before toggeling class
Fixes #14939 Closes jquerygh-1686
1 parent 89fe04a commit 882eb4c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/widgets/checkboxradio.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
115115

116116
if ( checked ) {
117117
this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
118-
this._addClass( this.icon, null, "ui-state-hover" );
118+
if ( this.icon ) {
119+
this._addClass( this.icon, null, "ui-state-hover" );
120+
}
119121
}
120122

121123
this._on( {

0 commit comments

Comments
 (0)