File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -117,15 +117,17 @@ return $.widget( "ui.controlgroup", {
117
117
. each ( function ( ) {
118
118
var element = $ ( this ) ;
119
119
var instance = element [ widget ] ( "instance" ) ;
120
+ var defaultInstance = instance || ( $ . fn [ widget ] . widgetConstructor &&
121
+ $ . fn [ widget ] . widgetConstructor . prototype ) ;
120
122
var instanceOptions = $ . widget . extend ( { } , options ) ;
121
123
122
124
// If the button is the child of a spinner ignore it
123
125
if ( widget === "button" && element . parent ( ".ui-spinner" ) . length ) {
124
126
return ;
125
127
}
126
- if ( instance ) {
128
+ if ( defaultInstance ) {
127
129
instanceOptions . classes =
128
- that . _resolveClassesValues ( instanceOptions . classes , instance ) ;
130
+ that . _resolveClassesValues ( instanceOptions . classes , defaultInstance ) ;
129
131
}
130
132
element [ widget ] ( instanceOptions ) ;
131
133
You can’t perform that action at this time.
0 commit comments