From 7bbda71a32cc4953715ed34eab2ab48c5e736154 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 1 Feb 2013 08:59:55 -0500 Subject: Dialog: Check for empty array in addition to empty object when checking if there are buttons. Fixes #9043 - Dialog: Buttonpane shown with no buttons when modifying native prototypes. --- ui/jquery.ui.dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index b6ac7aed7..cb62155e5 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -396,7 +396,7 @@ $.widget( "ui.dialog", { this.uiDialogButtonPane.remove(); this.uiButtonSet.empty(); - if ( $.isEmptyObject( buttons ) ) { + if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { this.uiDialog.removeClass("ui-dialog-buttons"); return; } -- cgit v1.2.3