diff options
author | Jyoti Deka <dekajp@gmail.com> | 2013-10-14 23:43:06 -0400 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-10-16 22:22:28 +0200 |
commit | ecde7cd41a59e9c3ff07f56baeeaec2147cca779 (patch) | |
tree | cdb3b636f816fa51c16b392b28ed11c9caa5ed91 /ui/jquery.ui.widget.js | |
parent | 9620812986a090668c44d48a7c85a46b580a89df (diff) | |
download | jquery-ui-ecde7cd41a59e9c3ff07f56baeeaec2147cca779.tar.gz jquery-ui-ecde7cd41a59e9c3ff07f56baeeaec2147cca779.zip |
Widget: option-method should work as getter only when argument length is 1. Fixes #9601 - Widget: calling _setOption with undefined as 3rd argument makes it a getter
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index a46dcaf99..cc01f784f 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -321,12 +321,12 @@ $.Widget.prototype = { curOption = curOption[ parts[ i ] ]; } key = parts.pop(); - if ( value === undefined ) { + if ( arguments.length === 1 ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { - if ( value === undefined ) { + if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; |