From 882eb4cbf261985624d4ce0f0a59ca8f38a4b054 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 23 Mar 2016 08:18:25 -0400 Subject: Checkboxradio: Check that there is an icon before toggeling class Fixes #14939 Closes gh-1686 --- ui/widgets/checkboxradio.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') 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( { -- cgit v1.2.3