aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widget.js')
-rw-r--r--ui/widget.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/widget.js b/ui/widget.js
index 3b149f11a..04daaa883 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -77,7 +77,7 @@ $.widget = function( name, base, prototype ) {
constructor = $[ namespace ][ name ] = function( options, element ) {
// Allow instantiation without "new" keyword
- if ( !this._createWidget ) {
+ if ( !this || !this._createWidget ) {
return new constructor( options, element );
}