]> source.dussan.org Git - jquery-ui.git/commitdiff
Checkboxradio: Check that there is an icon before toggeling class
authorAlexander Schmitz <arschmitz@gmail.com>
Wed, 23 Mar 2016 12:18:25 +0000 (08:18 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 30 Mar 2016 13:25:11 +0000 (09:25 -0400)
Fixes #14939
Closes gh-1686

ui/widgets/checkboxradio.js

index 10774920198b505aef8dc736b300f3329bd091f7..300cae8cee9a2875154c2310c89ef222fbff69f4 100644 (file)
@@ -115,7 +115,9 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
 
                if ( checked ) {
                        this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
-                       this._addClass( this.icon, null, "ui-state-hover" );
+                       if ( this.icon ) {
+                               this._addClass( this.icon, null, "ui-state-hover" );
+                       }
                }
 
                this._on( {