aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.widget.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-02-21 14:45:54 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-02-21 14:45:54 +0100
commit84a4a4442d25631bd00b50d48ff2d57a6089f6d3 (patch)
tree111c327befdc3cff15384d0dc56f9ff09281a651 /ui/jquery.ui.widget.js
parent5082e3e9717afaf0d6da1f863341d660c74c951c (diff)
parent7c4d6a763dfb5f9debf30c9a20875e046e89bc76 (diff)
downloadjquery-ui-84a4a4442d25631bd00b50d48ff2d57a6089f6d3.tar.gz
jquery-ui-84a4a4442d25631bd00b50d48ff2d57a6089f6d3.zip
Merge branch 'master' of github.com:jquery/jquery-ui
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r--ui/jquery.ui.widget.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 0a4759023..10a25b611 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -104,11 +104,6 @@ $.widget.bridge = function( name, object ) {
$.extend.apply( null, [ true, options ].concat(args) ) :
options;
- // prevent calls to internal methods
- if ( isMethodCall && options.charAt( 0 ) === "_" ) {
- return returnValue;
- }
-
if ( isMethodCall ) {
this.each(function() {
var instance = $.data( this, name );
@@ -116,7 +111,7 @@ $.widget.bridge = function( name, object ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
- if ( !$.isFunction( instance[options] ) ) {
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}
var methodValue = instance[ options ].apply( instance, args );