mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
fix (#654): incorrect handling of form number
This commit is contained in:
@@ -48,7 +48,9 @@ export function formObjToJSON$() {
|
||||
Object.keys(obj).forEach((key) => {
|
||||
const t = obj[key];
|
||||
if ("label" in t && "type" in t && "default" in t && "value" in t) {
|
||||
obj[key] = obj[key].value;
|
||||
let value = obj[key].value;
|
||||
if (t.type === "number") value = parseInt(value);
|
||||
obj[key] = value;
|
||||
} else {
|
||||
obj[key] = formObjToJSON(obj[key], level + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user