mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix(ui): cast empty strings to null
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
break;
|
||||
case 'string':
|
||||
value = value.toString();
|
||||
if (value.length === 0) {
|
||||
value = null;
|
||||
}
|
||||
break;
|
||||
case 'json':
|
||||
value = (value) ? JSON.parse(value) : [];
|
||||
@@ -111,7 +114,7 @@
|
||||
json[name] = element.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
json[name] = cast(json[name], castTo); // Apply casting
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user