Skip to content

Commit e5464f8

Browse files
committed
Accordion: Fixed back-compat for icons.headerSelected when icons option is null.
1 parent f0f54e3 commit e5464f8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

demos/accordion/custom-icons.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
icons: icons
2121
});
2222
$( "#toggle" ).button().toggle(function() {
23-
$( "#accordion" ).accordion( "option", "icons", false );
23+
$( "#accordion" ).accordion( "option", "icons", null );
2424
}, function() {
2525
$( "#accordion" ).accordion( "option", "icons", icons );
2626
});

ui/jquery.ui.accordion.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,10 @@ if ( $.uiBackCompat !== false ) {
628628

629629
var _createIcons = prototype._createIcons;
630630
prototype._createIcons = function() {
631-
this.options.icons.activeHeader = this.options.icons.activeHeader ||
632-
this.options.icons.headerSelected;
631+
if ( this.options.icons ) {
632+
this.options.icons.activeHeader = this.options.icons.activeHeader ||
633+
this.options.icons.headerSelected;
634+
}
633635
_createIcons.call( this );
634636
};
635637
}( jQuery, jQuery.ui.accordion.prototype ) );

0 commit comments

Comments
 (0)