aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.widget.js
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2013-01-30 08:32:48 -0600
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-03-19 16:08:00 +0100
commit4fce29e9356d7cbe2ccbdc29a391603580e852de (patch)
treebeb7e73d7a1b7fab36229c7992778c77ed56350a /ui/jquery.ui.widget.js
parent38c7b1ca814c59c48522cda6cfdf054c61773959 (diff)
downloadjquery-ui-4fce29e9356d7cbe2ccbdc29a391603580e852de.tar.gz
jquery-ui-4fce29e9356d7cbe2ccbdc29a391603580e852de.zip
Widgets: Updating to use instance method on bridge
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r--ui/jquery.ui.widget.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index ca097e02b..741ac74d7 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -178,14 +178,14 @@ $.widget.bridge = function( name, object ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
if ( options === "instance" ) {
returnValue = instance;
return false;
}
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}