diff --git a/ui/widget.js b/ui/widget.js index 41425b1a9d3..2fd4ada5320 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -190,11 +190,6 @@ $.widget.bridge = function( name, object ) { args = widget_slice.call( arguments, 1 ), returnValue = this; - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - if ( isMethodCall ) { this.each(function() { var methodValue, @@ -219,6 +214,11 @@ $.widget.bridge = function( name, object ) { } }); } else { + // allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + this.each(function() { var instance = $.data( this, fullName ); if ( instance ) {