Skip to content

Commit 06a781c

Browse files
authored
Update widget.js
Fix for options === true when using jQuery UI under use strict, which throws Uncaught TypeError: Cannot create property 'complete' on boolean 'true' on line options.complete = callback;
1 parent e7a10c7 commit 06a781c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/widget.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
717717
options = options || {};
718718
if ( typeof options === "number" ) {
719719
options = { duration: options };
720+
} else if ( options === true ) {
721+
options = {};
720722
}
721723

722724
hasOptions = !$.isEmptyObject( options );

0 commit comments

Comments
 (0)