From: Alexander Schmitz Date: Wed, 23 Mar 2016 12:18:25 +0000 (-0400) Subject: Checkboxradio: Check that there is an icon before toggeling class X-Git-Tag: 1.12.0-rc.2~73 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=882eb4cbf261985624d4ce0f0a59ca8f38a4b054;p=jquery-ui.git Checkboxradio: Check that there is an icon before toggeling class Fixes #14939 Closes gh-1686 --- 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( {