mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
Fix json input
This commit is contained in:
parent
e3ced837a0
commit
13150e5bc6
@ -19,7 +19,13 @@ const cleanData = (retrievedData, currentSchema, componentsSchema) => {
|
||||
|
||||
switch (attrType) {
|
||||
case 'json':
|
||||
cleanedData = value;
|
||||
try {
|
||||
cleanedData = JSON.parse(value);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
cleanedData = value;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user