Skip to content

Commit

Permalink
Accordion: Fixed back-compat for icons.headerSelected when icons opti…
Browse files Browse the repository at this point in the history
…on is null.
  • Loading branch information
scottgonzalez committed Nov 16, 2011
1 parent f0f54e3 commit e5464f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demos/accordion/custom-icons.html
Expand Up @@ -20,7 +20,7 @@
icons: icons
});
$( "#toggle" ).button().toggle(function() {
$( "#accordion" ).accordion( "option", "icons", false );
$( "#accordion" ).accordion( "option", "icons", null );
}, function() {
$( "#accordion" ).accordion( "option", "icons", icons );
});
Expand Down
6 changes: 4 additions & 2 deletions ui/jquery.ui.accordion.js
Expand Up @@ -628,8 +628,10 @@ if ( $.uiBackCompat !== false ) {

var _createIcons = prototype._createIcons;
prototype._createIcons = function() {
this.options.icons.activeHeader = this.options.icons.activeHeader ||
this.options.icons.headerSelected;
if ( this.options.icons ) {
this.options.icons.activeHeader = this.options.icons.activeHeader ||
this.options.icons.headerSelected;
}
_createIcons.call( this );
};
}( jQuery, jQuery.ui.accordion.prototype ) );
Expand Down

0 comments on commit e5464f8

Please sign in to comment.