We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
$.widget.bridge()
1 parent b6bec79 commit 713688dCopy full SHA for 713688d
ui/widget.js
@@ -195,11 +195,6 @@ $.widget.bridge = function( name, object ) {
195
args = widget_slice.call( arguments, 1 ),
196
returnValue = this;
197
198
- // allow multiple hashes to be passed on init
199
- options = !isMethodCall && args.length ?
200
- $.widget.extend.apply( null, [ options ].concat(args) ) :
201
- options;
202
-
203
if ( isMethodCall ) {
204
this.each(function() {
205
var methodValue,
@@ -224,6 +219,12 @@ $.widget.bridge = function( name, object ) {
224
219
}
225
220
});
226
221
} else {
222
+
223
+ // Allow multiple hashes to be passed on init
+ if ( args.length ) {
+ options = $.widget.extend.apply( null, [ options ].concat(args) );
+ }
227
228
229
var instance = $.data( this, fullName );
230
if ( instance ) {
0 commit comments