aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-22 15:33:57 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-22 15:36:11 -0400
commit9b908878ae3a9c0fbbd9958b579f223a648c5c69 (patch)
tree2b6576b8460b81ae1394bbc0cad47b6928277ebf /ui
parent6bedc0af357d9326ac39c37372b04d3bf7747454 (diff)
downloadjquery-ui-9b908878ae3a9c0fbbd9958b579f223a648c5c69.tar.gz
jquery-ui-9b908878ae3a9c0fbbd9958b579f223a648c5c69.zip
Widget: $.widget.extend(): Properly handle extending a string with an object. Fixes #8713 - Passing an object as ui.resizable handles parameter does not work.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.widget.js6
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;
+ }
}
}
}