fix a bug in converting non-boolean values back to boolean in the options manager

This commit is contained in:
Damien Churchill 2009-10-12 09:53:13 +00:00
parent a3636ccdb7
commit 3d85791a03
1 changed files with 8 additions and 3 deletions

View File

@ -207,7 +207,12 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
value = Number(value); value = Number(value);
break; break;
case 'boolean': case 'boolean':
if (Ext.type(value) == 'string') {
value = value.toLowerCase();
value = (value == 'true' || value == '1' || value == 'on') ? true : false;
} else {
value = Boolean(value); value = Boolean(value);
}
break; break;
} }
} }