mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
fix the type setting
This commit is contained in:
parent
8e45e77c74
commit
d89d4f7e38
@ -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…
x
Reference in New Issue
Block a user