aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2013-09-11 22:11:58 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-09-11 22:26:34 +0200
commit6e799c39d33be8eee02224d2f754dc42228a4cbb (patch)
treea6134169056aa77286a821ba7f432026d7938881 /ui
parent37bba1eb920298994903e866625bb662f391a1f5 (diff)
downloadjquery-ui-6e799c39d33be8eee02224d2f754dc42228a4cbb.tar.gz
jquery-ui-6e799c39d33be8eee02224d2f754dc42228a4cbb.zip
Widget Bridge: Make the _init method optional. Add tests for both states. Fixes #9543 - Widget bridge: Make _init() optional.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.widget.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 885e2019f..b4aab5f3e 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -203,7 +203,10 @@ $.widget.bridge = function( name, object ) {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
- instance.option( options || {} )._init();
+ instance.option( options || {} );
+ if ( instance._init ) {
+ instance._init();
+ }
} else {
$.data( this, fullName, new object( options, this ) );
}