Skip to content

Commit 2434dfd

Browse files
Interghostmgol
authored andcommitted
Widget: Fix boolean option when under use strict
Fix for `options === true` when using jQuery UI under `use strict`, which throws: ``` Uncaught TypeError: Cannot create property 'complete' on boolean 'true' ``` on line: ```js options.complete = callback; ``` Closes gh-1931
1 parent 6bf3804 commit 2434dfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/widget.js

+2
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)