prevent undefineds ending up as a key in the option manager
This commit is contained in:
parent
93468f342a
commit
a567b23262
|
@ -146,7 +146,9 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
|
|||
* @param {Object} value The value for the option
|
||||
*/
|
||||
setDefault: function(option, value) {
|
||||
if (value === undefined) {
|
||||
if (option === undefined) {
|
||||
return;
|
||||
} else if (value === undefined) {
|
||||
for (var key in option) {
|
||||
this.setDefault(key, option[key]);
|
||||
}
|
||||
|
@ -175,7 +177,9 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
|
|||
* @param {Object} [value];
|
||||
*/
|
||||
update: function(option, value) {
|
||||
if (value === undefined) {
|
||||
if (option === undefined) {
|
||||
return;
|
||||
} else if (value === undefined) {
|
||||
for (var key in option) {
|
||||
this.update(key, option[key]);
|
||||
}
|
||||
|
|
|
@ -189,7 +189,9 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
|||
* @param {Object} value The value for the option
|
||||
*/
|
||||
set: function(option, value) {
|
||||
if (typeof option == 'object') {
|
||||
if (option === undefined) {
|
||||
return;
|
||||
} else if (typeof option == 'object') {
|
||||
var options = option;
|
||||
this.options = Ext.apply(this.options, options);
|
||||
for (var option in options) {
|
||||
|
@ -207,7 +209,9 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
|||
* @param {Object} [value];
|
||||
*/
|
||||
update: function(option, value) {
|
||||
if (value === undefined) {
|
||||
if (option === undefined) {
|
||||
return;
|
||||
} else if (value === undefined) {
|
||||
for (var key in option) {
|
||||
this.update(key, option[key]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue