needed a .length in the condition

This commit is contained in:
scottjehl 2010-10-05 18:17:27 -04:00
parent 5008c95fed
commit 722fb14f5b

View file

@ -19,7 +19,7 @@ $.fn.controlgroup = function(options){
$(this).wrapInner('<div class="ui-controlgroup-controls"></div>');
//replace legend with more stylable replacement div
if(groupheading){
if( groupheading.length ){
$('<div role="heading" class="ui-controlgroup-label">'+ groupheading.html() +'</div>').insertBefore( $(this).children(0) );
groupheading.remove();
}