mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-15 23:08:41 +00:00
fix the type setting
This commit is contained in:
parent
8e45e77c74
commit
d89d4f7e38
1 changed files with 3 additions and 3 deletions
|
@ -774,11 +774,11 @@ Deluge.Widgets.GenericPreferences = new Class({
|
||||||
this.changed.each(function(value, key) {
|
this.changed.each(function(value, key) {
|
||||||
var type = $type(this.original[key]);
|
var type = $type(this.original[key]);
|
||||||
if (type == 'number') {
|
if (type == 'number') {
|
||||||
changed[key] = value.toFloat();
|
changed[key] = Number(value);
|
||||||
} else if (type == 'string') {
|
} else if (type == 'string') {
|
||||||
changed[key] = value.toString();
|
changed[key] = String(value);
|
||||||
} else if (type == 'boolean') {
|
} else if (type == 'boolean') {
|
||||||
changed[key] = value.toBoolean();
|
changed[key] = Boolean(value);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
return changed;
|
return changed;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue