aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorHrvoje Novosel <hrvoje.novosel@gmail.com>2020-07-15 16:10:20 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-10-06 14:54:13 +0200
commit2434dfd45d0805304e1db634d059feaa0bacf358 (patch)
treea023bd3944a31cd7a5faa82b1f48d9285b2bcbaf /ui
parent6bf38048f30886ae0545bb48df7c5a2011dff2b0 (diff)
downloadjquery-ui-2434dfd45d0805304e1db634d059feaa0bacf358.tar.gz
jquery-ui-2434dfd45d0805304e1db634d059feaa0bacf358.zip
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
Diffstat (limited to 'ui')
-rw-r--r--ui/widget.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/widget.js b/ui/widget.js
index 30034f592..4b5871205 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -717,6 +717,8 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
+ } else if ( options === true ) {
+ options = {};
}
hasOptions = !$.isEmptyObject( options );