From e5464f8f19f2026487bdffb465c6e77498449032 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 16 Nov 2011 07:59:21 -0500 Subject: Accordion: Fixed back-compat for icons.headerSelected when icons option is null. --- demos/accordion/custom-icons.html | 2 +- ui/jquery.ui.accordion.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/demos/accordion/custom-icons.html b/demos/accordion/custom-icons.html index de57f28b1..2351b9bb0 100644 --- a/demos/accordion/custom-icons.html +++ b/demos/accordion/custom-icons.html @@ -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 ); }); diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 6eb496a43..8289ee81b 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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 ) ); -- cgit v1.2.3