aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/checkboxradio.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2016-03-23 08:18:25 -0400
committerScott González <scott.gonzalez@gmail.com>2016-03-30 09:25:11 -0400
commit882eb4cbf261985624d4ce0f0a59ca8f38a4b054 (patch)
treeca33dde4a1afe5817bead172b75e842f093a8177 /ui/widgets/checkboxradio.js
parent89fe04af3d19b80147b93beca38986ca12952850 (diff)
downloadjquery-ui-882eb4cbf261985624d4ce0f0a59ca8f38a4b054.tar.gz
jquery-ui-882eb4cbf261985624d4ce0f0a59ca8f38a4b054.zip
Checkboxradio: Check that there is an icon before toggeling class
Fixes #14939 Closes gh-1686
Diffstat (limited to 'ui/widgets/checkboxradio.js')
-rw-r--r--ui/widgets/checkboxradio.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/widgets/checkboxradio.js b/ui/widgets/checkboxradio.js
index 107749201..300cae8ce 100644
--- a/ui/widgets/checkboxradio.js
+++ b/ui/widgets/checkboxradio.js
@@ -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( {