diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.widget.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index a125dd5ac..96cc6071c 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -143,7 +143,11 @@ $.widget.extend = function( target ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; if (input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - target[ key ] = $.isPlainObject( value ) ? $.widget.extend( {}, target[ key ], value ) : value; + if ( $.isPlainObject( value ) && $.isPlainObject( target[ key ] ) ) { + target[ key ] = $.widget.extend( {}, target[ key ], value ); + } else { + target[ key ] = value; + } } } } |