mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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
This commit is contained in:
parent
6bf38048f3
commit
2434dfd45d
@ -717,6 +717,8 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
if ( typeof options === "number" ) {
|
if ( typeof options === "number" ) {
|
||||||
options = { duration: options };
|
options = { duration: options };
|
||||||
|
} else if ( options === true ) {
|
||||||
|
options = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
hasOptions = !$.isEmptyObject( options );
|
hasOptions = !$.isEmptyObject( options );
|
||||||
|
Loading…
Reference in New Issue
Block a user